Extending Python Syntax with @

Peter Maas fpetermaas at netscape.net
Thu Mar 11 15:42:54 EST 2004


David MacQuigg schrieb:
>>David MacQuigg schrieb:
>>Disadvantages of your proposal:
>>
>>- The advantage is also a disadvantage: a lowered barrier for
>>  new semantics could bloat the language definition. Python's
>>  strength is that it has *few* concepts that are usable in *many*
>>  places. This could be compromised by your proposal.
> 
> 
> This is actually a separate issue.  Adding a few @ mods to selected
> statements does not mean that users can add their own.

I assumed that in my response but also GvR and the Python community
can do too much with @.

> Readability, in this case, is in the eye of the beholder.  'lambda' to
> me says 'wavelength', which I know has nothing to do with programming.

:-)) OK, of course I was talking about the semantics within the
language framework. Otherwise you could claim that def says deaf and
for says four ;-)

> 'yield' is a little closer to the intent, but again, to most new users
> it probably means something more like 'give way' or 'acquiesce', the
> opposite of 'resist'. If you had never seen 'yield' used as it is now
 > in Python, and your first encounter with generator functions was when
 > you saw @return, would you not think "Ah yes, a modified return.", and
 > would that not be closer to reality than whatever you might associate
 > with the word 'yield'?

Sometimes it's an advantage to be a non-native speaker. I know exactly
one meaning of yield (something like deliver) and that fits nicely to
generators. :)

Mit freundlichen Gruessen,

Peter Maas

-- 
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas at mplusr.de
-------------------------------------------------------------------



More information about the Python-list mailing list