[Python-ideas] New 3.x restriction on number of keyword arguments

Tal Einat taleinat at gmail.com
Sun Sep 19 11:08:28 CEST 2010

Lie Ryan wrote:

> On 09/18/10 06:00, Raymond Hettinger wrote:
> > The good news is that long argument lists are uncommon.  They
> > probably only arise in cases with dynamically created functions and
> > classes.  Most people are unaffected.
> How about showing a Warning when trying to create a large namedtuple?
> The Warning contains a reference to a bug issue, and should describe
> that if they really, really need to have this limitation removed, then
> they should ask in the bug report. Just so that we don't complicate the
> code unnecessarily without a real usage.
> In Python, classes are largely syntax sugar for a dictionary anyway, if
> they needed such a large namedtuple, they should probably reconsider
> using dictionary or list or real classes instead.

+1 on removing the restriction, just because I find large namedtuples

I work with large tables of data and often use namedtuples for their
compactness. Python dictionaries have a large memory overhead compared to
tuples. This restriction could seriously hamper my future efforts to migrate
to Python 3.

- Tal Einat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100919/933790d6/attachment.html>

More information about the Python-ideas mailing list