PEP 318: Can't we all just get along?

Paul Morrow pm_mon at yahoo.com
Thu Aug 19 06:35:18 EDT 2004


Michael J. Fromberger wrote:
> 
> Oh, I see it just fine -- but I still disagree with the idea of 
> including any such implicit magic in the language.  
> 
> In fact, I don't like some of the magic that is already there -- such 
> as, for instance, the automatic mangling of class members whose names 
> begin with a double underscore to get "private" semantics.  But that, at 
> least, is easy to avoid, if one doesn't want to use it.
> 

Unless of course you want a method to be private/semi-private.  How do 
you feel about the way we can create/manipulate lists and dictionaries 
using special (magical) syntax?  Why is that different (acceptable)?

	x = [10, 20, 30]

is shorthand for what would be much more code in other languages. Is 
that syntax ok but

	def __iAmPrivate(): pass

isn't?  Why?






More information about the Python-list mailing list