python-2.1 function attributes
Michael Hudson
mwh21 at cam.ac.uk
Fri Jan 26 08:49:30 EST 2001
"Tony J Ibbs (Tibs)" <tony at lsl.co.uk> writes:
> Michael Hudson wrote:
> > How about "having"?
> >
> > def func(param) having (publish=1, secure=0):
> > """ docco """
> > print "bobbins"
> >
> > to emphasize the attribute-ness one could use a dot prefix:
> >
> > def func(param) having (.publish=1, .secure=0):
> > """ docco """
> > print "bobbins"
> >
> > I think I like this (though I'm not sure about the dot
> > prefix). I might see if I can whip up a patch...
>
> Yes, "having" is better than "with". That's neat. And it doesn't have
> any obvious other meaning for me. (the important thing was probably
> getting away from "with" - once that's done, if people really don't like
> "having", suggesting new words is simple enough, at leisure)
Cheers for the support!
> I'm not sure about the dot prefix either - it makes them obviously odd,
> but feels sort-of unPythonic. I think I prefer without.
Whichever I do it will be dead simple to convert to the other, so I'll
do both and play around with them, and post them to sf (assuming I can
actually work out how to write the patch).
Done Grammar/Grammar, on to Python/compile.c (haven't been in *there*
for a while...)!
Cheers,
M.
--
ARTHUR: But which is probably incapable of drinking the coffee.
-- The Hitch-Hikers Guide to the Galaxy, Episode 6
More information about the Python-list
mailing list