Why does built-in set not take keyword arguments?

  • Thread starter Steven Watanabe
  • Start date
S

Steven Watanabe

I'm trying to do something like this in Python 2.4.3:

class NamedSet(set):
def __init__(self, items=(), name=''):
set.__init__(self, items)
self.name = name

class NamedList(list):
def __init__(self, items=(), name=''):
list.__init__(self, items)
self.name = name

I can do:

but I can't do:
TypeError: set() does not take keyword arguments

How come? How would I achieve what I'm trying to do?
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top