[Python-Dev] PEP 318 - generality of list; restrictions on
elements ([original](http://mail.python.org/pipermail/python-dev/2004-March/042989.html)) ([raw](?raw))
Michael Hudson mwh at python.net
Tue Mar 9 05:41:07 EST 2004
- Previous message: [Python-Dev] PEP 318 - generality of list; restrictions on elements
- Next message: [Python-Dev] PEP 318 - generality of list; restrictions on elements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Barry Warsaw <barry at python.org> writes:
On Mon, 2004-03-08 at 15:46, Skip Montanaro wrote:
I guess this is an area where PEP 318 should be fleshed out a bit. I don't see any reason it shouldn't be expanded to include semantics as well as syntax. That might require a title change, but I don't think the semantics should be left unspecified, nor do I think the syntax and semantics should reside in separate PEPs. I agree. FWIW, I think the list of things inside the square brackets should be simple identifiers, i.e. the names of callables that have been defined elsewhere.
I think this is a bad idea, as Skip says.
You can do this today:
class C(random.choice([list, object, dict))): pass
Doesn't mean people do, though.
I'd prefer to keep them simple, meaning no lambdas or list comprehensions. But that's just me.
I'm opposed to arbitrary restrictions.
Cheers, mwh
-- ARTHUR: Why are there three of you? LINTILLAS: Why is there only one of you? ARTHUR: Er... Could I have notice of that question? -- The Hitch-Hikers Guide to the Galaxy, Episode 11
- Previous message: [Python-Dev] PEP 318 - generality of list; restrictions on elements
- Next message: [Python-Dev] PEP 318 - generality of list; restrictions on elements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]