def args idiom and signatures
Evan Simpson
evan at tokenexchange.com
Fri Jan 21 16:23:12 EST 2000
More information about the Python-list mailing list
Fri Jan 21 16:23:12 EST 2000
- Previous message (by thread): def args idiom and signatures
- Next message (by thread): How to copy a binary file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Emile van Sebille <emile at fenx.com> wrote in message news:034401bf62f7$4fa7bba0$01ffffc0 at worldnet.att.net... > Well, wouldn't this be exposing what probably ought to be a private > function variable? If a function signature shows the def's argument > structure, how could a user tell that the intent is to *not* override > the value, and that doing so would break the function? I know in > this case the value itself ("000031028...") pretty much says that, but > I can easily imagine other values being pre-set in the def to avoid > the overhead. That's why in another thread we're pushing for syntax changes which would allow (among other things)... def _d(y, m, d, *, days=(0, 31, 59, ..., 334, 365)): ...to prevent 'days' from being part of the function signature while still allowing it to be pre-defined this way. Cheers, Evan @ 4-am
- Previous message (by thread): def args idiom and signatures
- Next message (by thread): How to copy a binary file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list