从 Twisted 启动 Python

发布于 2024-08-25 11:15:24 字数 202 浏览 2 评论 0原文

作为一名一年的 PHPer,我学习了 Python 大约一个月。我从 Twisted 开始,因为我在一家提供 Web 服务的公司工作。我已经完成了一些简单的应用程序,例如数据传输服务、页面图像获取服务等。但是问题是,我不太理解我在程序中编写的代码的结构。每次我都必须通过观看示例来编写代码。我的问题是,我应该尝试记住示例代码的结构吗?还是尝试理解它们?建议将非常感激。

问候

I have learnt Python for about a month as a one year's PHPer.And I started from Twisted as I'm working in a corporation supplying webservice.I have finished some simple application such as data transferring service,page images-fetch service etc.But the problem is ,I don't understand the struture of codes I wrote in the programs quite well .Every time I have to write codes by watching an example.And my question is ,should I just try to remember the example code's strutures?Or try to understand them?Suggestions would be very appreciated.

Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不知所踪 2024-09-01 11:15:24

仅仅“记住”代码结构相对于简单地查找它并没有那么大的额外价值(只需让自己成为一个正在使用的示例的方便存储库)——死记硬背,而曾经是强迫学生的流行做法去做,并不是那么有用。

当然,理解要好得多……但是,我不知道通向它的“皇家之路”,无论是一般情况还是对 Twisted 特别而言。也许可以尝试 Fettig 的书——不是杰作,它在亚马逊上有三颗星它可能值得大约 3.5 左右——但恕我直言,这是对你的金钱和时间的相当合理的投资。为了更好地理解Python——与Twisted完全不同——你处于更好的位置——Dive into Python 一本杰作,你可以免费下载它(如果你真的喜欢纸质书籍,你也可以购买纸质版)。在亚马逊上获得 4.5 颗星,实至名归!

Just "remembering" the code structure isn't all that much extra value with respect to simply looking it up (just make yourself a handy repository of the examples you're using) -- rote memorization, while once a popular thing to force students to do, isn't all that useful.

Understanding is, of course, much better... but, I know no "royal road" to it, either in general or for Twisted in particular. Maybe try Fettig's book -- not a masterpiece, it has three stars on Amazon and it may deserve about 3.5 or so -- but quite a reasonable investment of your money and time, IMHO. To get better understanding of Python -- quite apart from Twisted -- you're better placed -- Dive into Python is a masterpiece, and you can freely download it (if you really love paper books you can also buy the paper edition). Has 4.5 stars on Amazon and deserves them!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文