list as a base class in Python 2.1

B

bdecker

Hello,


With python2.2 I am able to define a class based on the 'list' type as
follows:

class sample(list):
...

But this doesn't work under python 2.1. Is there still a way to simply
use the list type as a base class under python 2.1?



Ben
 
D

David M. Cooke

At said:
Hello,

With python2.2 I am able to define a class based on the 'list' type as
follows:

class sample(list):
...

But this doesn't work under python 2.1. Is there still a way to simply
use the list type as a base class under python 2.1?

No. But you could try the UserList module, which will make it easier
to emulate a list.
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top