Python dot-equals (syntax proposal)

Peter Otten __peter__ at web.de
Fri Apr 30 12:36:40 EDT 2010


Jabapyth wrote:

> At least a few times a day I wish python had the following shortcut
> syntax:
> 
> vbl.=func(args)
> 
> this would be equivalent to
> 
> vbl = vbl.func(args)
> 
> example:
> 
> foo = "Hello world"
> foo.=split(" ")
> print foo
> # ['Hello', 'world']

Extending a language comes at a cost, too. A language with 1000 superb 
features will be much harder to use than one with 10 or 20. 

In that spirit I suggest a thought experiment: which two features would you 
kick out of Python to get your new one in?

Peter



More information about the Python-list mailing list