Language design

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Sep 11 19:40:22 EDT 2013


On Wed, 11 Sep 2013 14:30:54 -0700, Mark Janssen wrote:

> 1) It tried to make Object the parent of every class.  

Tried, and succeeded.


> No one's close enough to God to make that work.

Non-sequitor. One doesn't need to be close to a deity to have a single 
root of the object hierarchy.


> 2) It didn't make dicts inherit from sets when they were added to
> Python. 

Why would you want dicts to inherit from sets?


> 3) It used the set literal for dict, so that there's no obvious
> way to do it.  This didn't get changed in Py3k. 

No, it uses the dict literal for dicts. 

And the obvious way to form an empty set is by calling set(), the same as 
str(), int(), list(), float(), tuple(), dict(), ... 


> 4?) It allowed
> [reference] variables to be used as dict keys.  This creates a parsing
> difficulty for me, mentally.  Keys should be direct, hashable values,
> not hidden in a variable name.

I don't even understand what you are talking about here. "[reference] 
variables"? What does that mean?

Dict keys are direct, hashable values, and I have no idea what you mean 
by "hidden in a variable name".



-- 
Steven



More information about the Python-list mailing list