The Zen of Cat

The Man was very sad. He knew that the Cat’s days were numbered.The doctor had said there wasn’t anything more that could be done,that he should take the Cat home and make him as comfortable as possible.
  The man stroked the Cat on his lap and sighed.The Cat opened his eyes, purred and looked up at the Man. A tear rolled down the Man’s cheek and landed on the Cat’s forehead.The Cat gave him a slightly annoyed look.
  “Why do you cry, Man?”the Cat asded.“Because you can’t bear the thought of losing me? Because you think you can never replace me?”The Man nodded “yes.”
  “And where do you think I’ll be when I leave you?”the Cat asked. The Man shrugged helplessly. “Close your eyes, Man,” the Cat said. The Man gave him a questioning look, but did as he was told.
  “What color are my eyes and fur?” the Cat asked. “Your eyes are gold and your fur is a rich, warm brown,” the Man replied.
  “And where is it that you most often see me?”asked the Cat. “I see you…on the kitchen windowsill watching the birds…on my favorite chair…on my desk lying on the papers I need…on the pillow next to my head at night.” “Then, whenever you wish to see me, all you must do is close your eyes,” said the Cat.
  “Pick up that piece of string from the floor——there, my ‘toy.’” The Man opened his eyes, then reached over and picked up the string. It was about two feet long and the Cat had been able to entertain himself for hours with it. “Now take each end of the string in one hand,” the Cat ordered. The Man did so.
  “The end in your left hand is my birth and the end in your right hand is my death. Now bring the two ends together,” the Cat said. The Man complied.
  “You have made a continuous circle,” said the cat.“Does any point along the string appear to be different, worse or better than any other part of the string?” The Man inspected the string and then shook his head “no.”
  “Close your eyes again,” the Cat said.“Now lick your hand.” The Man widened his eyes in surprise.
  “Just do it,” the Cat said.“Lick your hand,think of me in all my familiar places, think about all the pieces of string.”
  The Man felt foolish, licking his hand, but he did as he was told. He discovered what a cat must know, that licking a paw is very calming and allows one to think more clearly. He continued licking and the corners of his mouth turned upward into the first smile he had shown in days. He waited for the Cat to tell him to stop,and when he didn’t, he opened his eyes. The Cat’s eyes were closed.The Man stroked the warm, brown fur, but the Cat was gone.
  The Man shut his eyes hard as the tears poured down his face. He saw the Cat on the windowsill, then in his bed, then lying across his important papers. He saw him on the pillow next to his head, saw his bright gold eyes and darkest brown on his nose and ears. He opened his eyes and through his tears looked over at the circle of string he still held clutched in his hand.
  One day, not long after, there was a new Cat on his lap. She was a lovely calico and white…very different from his earlier beloved Cat and very much the same.

《Python禅机》是一本关于Python编程语言的指导原则和哲学的PDF文档。它概述了Python社区对编写Python代码的最佳实践和编码风格的一系列理念。 首先,它强调了Python的简洁和可读性。Python编码应该简洁明了,代码行数应尽量保持简短,不要使用复杂的语法和冗余的代码。可读性也极为重要,在同样功能的实现中,应该选择更易于理解和阅读的实现方式。 其次,该文档强调了Python的可执行性和直观性。Python鼓励程序员编写可执行的、易于测试和验证的代码。此外,Python也注重代码的直观性,即代码应该以一种清晰、直接和自然的方式表达思想,减少歧义和模棱两可。 此外,《Python禅机》还强调了Python社区的合作和开放精神。Python鼓励程序员彼此合作、分享和学习,通过交流和互助来提高编程水平。它也鼓励开源软件的开发和使用,通过共享代码来促进创新和进步。 最后,该文档提到了Python的错误处理和异常处理机制。Python鼓励程序员显式地处理错误和异常,以提高代码的健壮性和可靠性。此外,它还鼓励程序员记录错误信息以便调试和修复错误。 总结来说,《Python禅机》强调了Python的简洁、可读性、可执行性、直观性、合作精神以及错误处理。它是Python社区对编写Python代码的基本原则和哲学的总结,对于提高编程水平和编写高质量的Python代码非常有价值。
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值