[Python-3000] pep 3124 plans

Aurélien Campéas aurelien.campeas at logilab.fr
Thu Jul 19 17:41:42 CEST 2007


On Thu, Jul 19, 2007 at 07:22:37AM -0700, Guido van Rossum wrote:
> On 7/19/07, Aurélien Campéas <aurelien.campeas at logilab.fr> wrote:
>> I would have liked to have input on this from other people using
>> RuleDispatch features also (doesn't one of Django/Turbogears project
>> use them extensively ?). Just so the BDFL & lieutenants don't argue
>> too much in the direction of 'the community has no experience with
>> these things'. I think (wishfully ?) a sizeable, if not big, part of
>> the python *user* community is knwoledgeable about it. These people do
>> not necessarily express themselves there.
>
> Thanks for posting. It's been excruciatingly hard to find anyone
> besides Phillip interested in GFs or able to provide use cases. For me
> they're mostly still something theoretically interesting from other
> languages, like continuations. Maybe you can round up some more
> users?

I will try.

Please note that (imho) unlike scheme's first class continuations
(which are clearly an über-powerful, hard-to-master meta-programming
feature), method combinations are just another tool for day-to-day
programming (in languages that already provide them), especially large
systems. One can certainly live without them, just like one can
program without the python 2.5 with statement. I sincerely believe
Zope cries for gfs, including standard method combination, since its
inception.

Btw, I like to think of 'with' as a (static) decorator for code
blocks. Why not see before/after/around methods like a variation on
the theme of (dynamic) decoration of existing methods ? Terminology
change seems important for the Python community as it (perhaps) helps
assimilation of new concepts in the light of ones that are already
mastered. Dunno if that makes sense, yet.

>
> FWIW, I think the Turbogears use you're thinking of is jsonify, a GF
> for converting arbitrary Python data into JSON (JavaScript Object
> Notation). 

Yes and I remember well Simon Belak's presentation (and enthusiasm) at
EP 2006.

At least from http://turbogears.org/ultimate.html one sees that
generic functions are somewhat used also in :

# choose widgets for data entry (tgfastdata.formmaker)
# pick an output method for expose() (turbogears.controllers)
# choose an error handler when something goes wrong (turbogears.errorhandling)

> But I'm not aware of it using any of the advanced features
> -- it seems to be using just the basic facility of overloading on a
> single argument type, which could be done with my own "overloading"
> example (see the Python subversion sandbox). At least that's what I
> got from skimming the docs:
> http://docs.turbogears.org/1.0/JsonifyDecorator . That article claims
> that TurboGears uses RuleDispatch extensively. I'd love to hear from
> them about how they use the advanced features.

I might want to take some time next week to have a look at the source.

Anyway thanks for leting that door still open, I felt like it was all
done.

Aurélien.

>
> -- 
> --Guido van Rossum (home page: http://www.python.org/~guido/)
>


More information about the Python-3000 mailing list