Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16984

Re: Verbose and flexible args and kwargs syntax

From Christian Heimes <lists@cheimes.de>
Subject Re: Verbose and flexible args and kwargs syntax
Date 2011-12-11 14:14 +0100
References <4EE48AB3.7070807@gmail.com> <mailman.3510.1323602145.27778.python-list@python.org> <Xns9FB880CEA6F2Fduncanbooth@127.0.0.1>
Newsgroups comp.lang.python
Message-ID <mailman.3512.1323609269.27778.python-list@python.org> (permalink)

Show all headers | View raw


Am 11.12.2011 13:39, schrieb Duncan Booth:
>> Another issue: You suggest being able to use "attrdict" or some other
>> dict subclass. This means that, rather than being a language
>> construct, this will involve a name lookup. And what happens if you
>> have a class that subclasses both list and dict? Will it get the
>> positional args, the keyword args, or both?
> 
> Irrelevant, you can't subclass both list and dict:

But you can fake it with __instancecheck__ and __subclasscheck__ methods.

Christian

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Verbose and flexible args and kwargs syntax Chris Angelico <rosuav@gmail.com> - 2011-12-11 22:15 +1100
  Re: Verbose and flexible args and kwargs syntax Duncan Booth <duncan.booth@invalid.invalid> - 2011-12-11 12:39 +0000
    Re: Verbose and flexible args and kwargs syntax Chris Angelico <rosuav@gmail.com> - 2011-12-12 00:09 +1100
    Re: Verbose and flexible args and kwargs syntax Christian Heimes <lists@cheimes.de> - 2011-12-11 14:14 +0100

csiph-web