Memory error due to big input file

Vilya Harvey vilya.harvey at gmail.com
Mon Jul 13 17:51:01 EDT 2009


2009/7/13 Aaron Scott <aaron.hildebrandt at gmail.com>:
>> BTW, you should derive all your classes from something.  If nothing
>> else, use object.
>>   class textfile(object):
>
> Just out of curiousity... why is that? I've been coding in Python for
> a long time, and I never derive my base classes. What's the advantage
> to deriving them?

    class Foo:

uses the old object model.

    class Foo(object):

uses the new object model.

See http://docs.python.org/reference/datamodel.html (specifically
section 3.3) for details of the differences.

Vil.



More information about the Python-list mailing list