Code evaluation at function definition execution time (was Re: Compile time evaluation (aka eliminating default argument hacks))
Carl Banks
invalidemail at aerojockey.com
Thu Mar 10 18:14:39 EST 2005
More information about the Python-list mailing list
Thu Mar 10 18:14:39 EST 2005
- Previous message (by thread): Code evaluation at function definition execution time (was Re: Compile time evaluation (aka eliminating default argument hacks))
- Next message (by thread): Distutils spawn on unix acting strange
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Carl Banks wrote: > I could, however, see myself > using the slightly more complicated descriptor such as this (for a > wholly different reason, though): > > . def call_with_open_file(filename): > . def descriptor(func): > . flo = open(filename) > . try: f(flo) > . finally: f.close() > . return None > . return descriptor Apparently, I don't know the difference between a descriptor and a decorator. -- CARL BANKS
- Previous message (by thread): Code evaluation at function definition execution time (was Re: Compile time evaluation (aka eliminating default argument hacks))
- Next message (by thread): Distutils spawn on unix acting strange
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list