more advanced learning resources (code structure, fundamentals)

Discussion in 'Python' started by John [H2O], Jul 7, 2011.

  1. John [H2O]

    John [H2O] Guest


    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:,-fundamentals)-tp32011481p32011481.html
    Sent from the Python - python-list mailing list archive at
    John [H2O], Jul 7, 2011
    1. Advertisements

  2. Mel

    Mel Guest

    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/ , .../ , etc.

    Mel, Jul 7, 2011
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?Gregory_Pi=F1ero?=

    Passing arguments to function - (The fundamentals are confusing me)

    =?ISO-8859-1?Q?Gregory_Pi=F1ero?=, Aug 9, 2005, in forum: Python
    Dennis Lee Bieber
    Aug 10, 2005
  2. Doug

    Python / glade fundamentals

    Doug, Mar 16, 2006, in forum: Python
    Ido Yehieli
    Mar 20, 2006
  3. Michele Simionato
    Mar 27, 2010
  4. John Maclean

    More on the fundamentals...

    John Maclean, Jan 3, 2006, in forum: Ruby
    Yohanes Santoso
    Jan 4, 2006
  5. Replies:

Share This Page