Beautiful Code in Python?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • js

    Beautiful Code in Python?

    Hi,

    Have you ever seen Beautiful Python code?
    Zope? Django? Python standard lib? or else?

    Please tell me what code you think it's stunning.
  • Michele Simionato

    #2
    Re: Beautiful Code in Python?

    On Mar 2, 5:23 pm, js <ebgs...@gmail. comwrote:
    Hi,
    >
    Have you ever seen Beautiful Python code?
    Zope? Django? Python standard lib? or else?
    >
    Please tell me what code you think it's stunning.
    The doctest module in the standard library.

    M.S.

    Comment

    • John DeRosa

      #3
      Re: Beautiful Code in Python?

      On Mon, 3 Mar 2008 01:23:32 +0900, js <ebgssth@gmail. comwrote:
      >Hi,
      >
      >Have you ever seen Beautiful Python code?
      >Zope? Django? Python standard lib? or else?
      >
      >Please tell me what code you think it's stunning.
      Just about any Python code I look at.

      Comment

      • castironpi@gmail.com

        #4
        Re: Beautiful Code in Python?

        On Mar 2, 12:01 pm, John DeRosa <stug...@qwest. netwrote:
        On Mon, 3 Mar 2008 01:23:32 +0900, js <ebgs...@gmail. comwrote:
        Hi,
        >
        Have you ever seen Beautiful Python code?
        Zope? Django? Python standard lib? or else?
        >
        Please tell me what code you think it's stunning.
        >
        Just about any Python code I look at.
        Decorators, with, and namedtuple.

        Comment

        • Bruno Desthuilliers

          #5
          Re: Beautiful Code in Python?

          js a écrit :
          Hi,
          >
          Have you ever seen Beautiful Python code?
          Zope? Django? Python standard lib? or else?
          >
          Please tell me what code you think it's stunning.
          FormEncode has some very interesting parts IMHO.

          Comment

          • Jonathan Gardner

            #6
            Re: Beautiful Code in Python?

            On Mar 2, 8:35 am, Michele Simionato <michele.simion ...@gmail.com>
            wrote:
            On Mar 2, 5:23 pm, js <ebgs...@gmail. comwrote:
            >
            Hi,
            >
            Have you ever seen Beautiful Python code?
            Zope? Django? Python standard lib? or else?
            >
            Please tell me what code you think it's stunning.
            >
            The doctest module in the standard library.
            >
             M.S.
            The first thing of beauty I found in Python (coming from C, C++, and
            perl) was the way Python handled variables, or as someone recently
            described them, names.

            Python's "for" statement is always beautiful to look at. Especially
            when someone uses the else clause rather than trying to detect if the
            list was exhausted. I sometimes avoid using the comprehensions just to
            get an excuse to write another for loop in Python. There can never be
            enough for loops written in Python!

            Also, Python's iterator interface is by far the most beautiful thing I
            have ever seen in the world of programming. Of course, the reason why
            the for loop is so beautiful is because iterators are so beautiful.

            Comment

            • babycode@gmail.com

              #7
              Re: Beautiful Code in Python?

              Please tell me what code you think it's stunning.

              Pexpect is (almost) pseudocode is (almost) poetry to my ears. And
              there's a lot of narrative in it as well:


              Comment

              • castironpi@gmail.com

                #8
                Re: Beautiful Code in Python?

                On Mar 2, 1:18 pm, castiro...@gmai l.com wrote:
                On Mar 2, 12:01 pm, John DeRosa <stug...@qwest. netwrote:
                >
                On Mon, 3 Mar 2008 01:23:32 +0900, js <ebgs...@gmail. comwrote:
                >Hi,
                >
                >Have you ever seen Beautiful Python code?
                >Zope? Django? Python standard lib? or else?
                >
                >Please tell me what code you think it's stunning.
                >
                Just about any Python code I look at.
                >
                Decorators, with, and namedtuple.
                <running gag>Oh yeah, and variable arguments and keyword
                dictionaries.<t hroat clear/></running gag>

                Comment

                • castironpi@gmail.com

                  #9
                  Re: Beautiful Code in Python?

                  On Mar 9, 6:44 pm, castiro...@gmai l.com wrote:
                  On Mar 2, 1:18 pm, castiro...@gmai l.com wrote:
                  >
                  On Mar 2, 12:01 pm, John DeRosa <stug...@qwest. netwrote:
                  >
                  On Mon, 3 Mar 2008 01:23:32 +0900, js <ebgs...@gmail. comwrote:
                  Hi,
                  >
                  Have you ever seen Beautiful Python code?
                  Zope? Django? Python standard lib? or else?
                  >
                  Please tell me what code you think it's stunning.
                  >
                  Just about any Python code I look at.
                  >
                  Decorators, with, and namedtuple.
                  >
                  <running gag>Oh yeah, and variable arguments and keyword
                  dictionaries.<t hroat clear/></running gag>
                  If you're C++, garbage collection. How's the cycle detector? The
                  pages and pages get pretty specific.

                  Comment

                  Working...