tags:

views:

84

answers:

1

Hi all,

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

+3  A: 

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!

Alex Martelli