Language design

Mark Janssen dreamingforward at gmail.com
Wed Sep 11 17:30:54 EDT 2013


1) It tried to make Object the parent of every class.  No one's close
enough to God to make that work.
2) It didn't make dicts inherit from sets when they were added to Python.
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.
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.

A few of the top of the head....

Mark

On Mon, Sep 9, 2013 at 11:09 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> Some time ago, Tom Christiansen wrote about the "Seven Deadly Sins of
> Perl":
>
> http://www.perl.com/doc/FMTEYEWTK/versus/perl.html
>
>
> What design mistakes, traps or gotchas do you think Python has? Gotchas
> are not necessarily a bad thing, there may be good reasons for it, but
> they're surprising.
>
> To get started, here are a couple of mine:
>
>
> - Python is so dynamic, that there is hardly anything at all that can be
> optimized at compile time.
>
> - The behaviour of mutable default variables is a gotcha.
>
> - Operators that call dunder methods like __add__ don't use the same
> method resolution rules as regular methods, they bypass the instance and
> go straight to the type, at least for new-style classes.
>
>
>
> --
> Steven
> --
> https://mail.python.org/mailman/listinfo/python-list



-- 
MarkJ
Tacoma, Washington



More information about the Python-list mailing list