On Thu, 12 Jan 2006 03:42:21 -0600,
Brian van den Broek <[EMAIL PROTECTED]> wrote:

> It's broken in at least one way:

>>>> newmd = ModFlagDict(3=4, 1=5)
> SyntaxError: keyword can't be an expression
>>>> 

> So, as it stands, no integers, floats, tuples, etc can be keys on
> initialization ...

That has nothing to do with your code:

>>> dict(1=4)
SyntaxError: keyword can't be an expression
>>> int(4=5)
SyntaxError: keyword can't be an expression

The names of keyword arguments have look like Python identifiers; 1 and
4 are *not* valid Python identifiers.

Regards,
Dan

-- 
Dan Sommers
<http://www.tombstonezero.net/dan/>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to