> Can't you read the data from the binary file as needed?
> For example build a table of object ids versus file locations
> and then use seek() to go to an object and load it from file
> on demand?
>
> > So, in doing so, I end up with a whole lot of objects, but it's a
> > whole lot of objects I ca
Mike Hansen wrote:
>>From:
>>Kent Johnson <[EMAIL PROTECTED]>
>>I think the conventional advice is something like, if you don't
>>understand why using slots is a bad idea, you have no business using
>>them :-)
>>
> Can you tell us the pros and cons of using slots?
I think I am in the group of p
> Subject:
> Re: [Tutor] __slots__
> From:
> Kent Johnson <[EMAIL PROTECTED]>
> Date:
> Wed, 12 Oct 2005 18:22:46 -0400
>
> CC:
> Python Tutor Mailing List
>
>
> Liam Clarke wrote:
>
>> Well, all I can say is, don't use them unless yo
> > As a matter of interest why do you need so many in RAM at once?
>
> I'm creating an object for each header (for want of a better word.) A
> song is described by an object with several children objects, each one
> has certain attributes.
OK, But you only need the song object group to manipulat
On 10/13/05, Alan Gauld <[EMAIL PROTECTED]> wrote:
> > an object with 70ish attributes makes. FWIW, I'm doing the exact
> > opposite of XP, and building to handle 300,000 to 600,000 objects...
>
> As a matter of interest why do you need so many in RAM at once?
> Its very unusual to require that man
Liam Clarke wrote:
> Well, all I can say is, don't use them unless you need them, they're a
> lot of hassle.
I think the conventional advice is something like, if you don't understand why
using slots is a bad idea, you have no business using them :-)
> I created two versions of the same object,
> an object with 70ish attributes makes. FWIW, I'm doing the exact
> opposite of XP, and building to handle 300,000 to 600,000 objects...
As a matter of interest why do you need so many in RAM at once?
Its very unusual to require that many and there are techniques to
minimise the space by using '
If you've been wondering about how useful this is...
Well, all I can say is, don't use them unless you need them, they're a
lot of hassle.
I created two versions of the same object, same attribute values, one
with slots, one without.
With slots, it pickled to a string of 163 characters. Without,