Learning Python advanced features

Discussion in 'Python' started by jvpic, Aug 27, 2009.

  1. jvpic

    jvpic Guest

    Hi,

    Learning Python, I understand the mechanism of : closure, __new__,
    descriptors, decorators and __metaclass__, but I interrogate myself on
    the interest of those technics ?

    May somebody explain me the interest ?

    Many thanks !

    Jackes Bihan
     
    jvpic, Aug 27, 2009
    #1
    1. Advertisements

  2. jvpic a écrit :
    > Hi,
    >
    > Learning Python, I understand the mechanism of : closure, __new__,
    > descriptors, decorators and __metaclass__, but I interrogate myself on
    > the interest of those technics ?
    >
    > May somebody explain me the interest ?


    Didn't like my answers on f.c.l.py ?-)
     
    Bruno Desthuilliers, Aug 27, 2009
    #2
    1. Advertisements

  3. Bonsoir !

    Tu aurais peut-être dû répondre en anglais (pour certains, "advanced features", c'est mieux que "concepts sophistiqués").

    @+

    MCI
     
    Michel Claveau - MVP, Aug 27, 2009
    #3
  4. On Aug 27, 5:13 am, jvpic <> wrote:
    > Hi,
    >
    > Learning Python, I understand the mechanism of : closure, __new__,
    > descriptors, decorators and __metaclass__, but I interrogate myself on
    > the interest of those technics ?
    >
    > May somebody explain me the interest ?
    >


    I assume you are asking, "Why do these features exist? What makes them
    useful? When would I use them?"

    For that, you should re-read the documentation and discussion
    surrounding them. The short answer is that the above makes your job,
    as a programmer easier. It's easier because you have to write less
    code, read less code, and your code has fewer bugs.
     
    Jonathan Gardner, Aug 27, 2009
    #4
  5. jvpic

    jvpic Guest

    Bruno Desthuilliers a écrit :
    > jvpic a écrit :
    >> Hi,
    >>
    >> Learning Python, I understand the mechanism of : closure, __new__,
    >> descriptors, decorators and __metaclass__, but I interrogate myself on
    >> the interest of those technics ?
    >>
    >> May somebody explain me the interest ?

    >
    > Didn't like my answers on f.c.l.py ?-)

    Si, mais je voulais savoir ce qu'on en pense sur un autre forum !
    Merci encore...
     
    jvpic, Aug 28, 2009
    #5
  6. jvpic a écrit :
    > Bruno Desthuilliers a écrit :
    >> jvpic a écrit :
    >>> Hi,
    >>>
    >>> Learning Python, I understand the mechanism of : closure, __new__,
    >>> descriptors, decorators and __metaclass__, but I interrogate myself
    >>> on the interest of those technics ?
    >>>
    >>> May somebody explain me the interest ?

    >>
    >> Didn't like my answers on f.c.l.py ?-)

    > Si, mais je voulais savoir ce qu'on en pense sur un autre forum !
    > Merci encore...


    Hum... I guess the smiley was not big enough !-)
     
    Bruno Desthuilliers, Aug 28, 2009
    #6
  7. Jonathan Gardner a écrit :
    > On Aug 27, 5:13 am, jvpic <> wrote:
    >> Hi,
    >>
    >> Learning Python, I understand the mechanism of : closure, __new__,
    >> descriptors, decorators and __metaclass__, but I interrogate myself on
    >> the interest of those technics ?
    >>
    >> May somebody explain me the interest ?
    >>

    >
    > I assume you are asking, "Why do these features exist? What makes them
    > useful? When would I use them?"
    >
    > For that, you should re-read the documentation and discussion
    > surrounding them. The short answer is that the above makes your job,
    > as a programmer easier. It's easier because you have to write less
    > code, read less code, and your code has fewer bugs.


    I think the OP is mostly looking for practical use cases. FWIW, when I
    discovered Python's "lambda" (I only knew a couple low-level imperative
    languages by that time), I really wondered what an anonymous function
    could be used for !-)
     
    Bruno Desthuilliers, Aug 28, 2009
    #7
    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. Kl
    Replies:
    1
    Views:
    359
    Kent Johnson
    Dec 4, 2004
  2. Jonathan Mcdougall
    Replies:
    2
    Views:
    580
    Kaz Kylheku
    Nov 3, 2005
  3. BillJosephson
    Replies:
    148
    Views:
    3,206
    peter koch
    Jan 27, 2007
  4. Krice

    Advanced features

    Krice, Sep 11, 2009, in forum: C++
    Replies:
    16
    Views:
    657
    Jerry Coffin
    Sep 13, 2009
  5. Michele Simionato
    Replies:
    1
    Views:
    708
    Lacrima
    Mar 27, 2010
Loading...

Share This Page