Why can function definitions only use identifiers, and not attribute references or any other primaries?
Jeremy Banks
jeremy at jeremybanks.ca
Thu Apr 23 11:26:31 EDT 2009
> Things like your suggestion are called "syntactic-sugar" -- syntax that
> adds a convenience, but *no* new functionality. Python has plenty of
> "syntactic-sugar"s, and more will be added in the future. To make an
> argument for such an addition, one would have to describe some compelling
> (and general) use cases in a well-argued PEP. You're welcome to try, but be
> forewarned, most PEP's (especially syntax changing PEPs) don't fly far.
Thank you very much for the feedback. I might throw something at
Python-Ideas if I think I can come up with an adequate justification
and don't come accross a previous similar propsition (though if I do
miss it I'm sure it will be pointed out to me fairly quickly). I fully
appreciate the small chance of success, but it certainly couldn't hurt
to give it a try.
More information about the Python-list
mailing list