more advanced learning resources (code structure, fundamentals)
I've been programming in Python for a few years now. I have read most the
typical learning resources, such as 'Dive Into Python', 'A Byte of Python',
etc. In general I feel I have a good overview of the language. However, as I
advanced toward trying to create more OO styled programs, I feel I am
lacking some background on basic concepts.
I have read 'Coding' and 'Beautiful Code', and while these provide good
information on how to style and think about code, they haven't help me
design classes, think about where and when to use inheritance, decorators,
etc. The point is, most examples stop at demonstrating a single class, or
show a trivial decorator example. What I am after is something that will
help me design a program from scratch.
What are the key points to the classes? Is it okay to reference or pass
classes to instantiate a class? When would I want to use a decorator? How to
decide which should be a static method, and if I need them at all?
I know a lot of this would come from experience of working in a team, but
unfortunately, I'm mostly running solo. I am starting to look more and more
at source code too, which I find helpful, but the styles of programming vary
significantly. Perhaps someone could say which modules have nice 'exemplary'
code worth learning from?
So, if someone has a good book or online reference, please point me to it.
Other ideas too are most certainly welcome!
View this message in context: http://old.nabble.com/more-advanced-...p32011481.html
Sent from the Python - python-list mailing list archive at Nabble.com.
Re: more advanced learning resources (code structure, fundamentals)
John [H2O] wrote:
[ ... ]
> What are the key points to the classes? Is it okay to reference or pass
> classes to instantiate a class?
Yes. The standard library does this in BaseHTTPServer (via its parent
SocketServer.) Maybe looks abstruse at the outset, but it's the natural way
to assign a fresh message handler to a new input message. Docs are via the
Python Global Module Index, source is in some directory like
/usr/lib/python2.6/SocketServer.py , .../BaseHTTPServer.py , etc.
|All times are GMT. The time now is 02:07 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.