On Feb 19, 2:17 pm, Karlo Lozovina <[EMAIL PROTECTED]> wrote:
> Let's say I have a class with few string properties and few integers, and
> a lot of methods defined for that class.
>
> Now if I have hundreds of thousands (or even more) of instances of that
> class - is it more efficient to remove those methods and make them
> separate functions, or it doesn't matter?

What do you mean by efficient. Memory efficient? I would assume that
making them separate functions would use less memory but would you
sacrifice code readability for that (small?) of a memory saving?

Good coding practice suggests that the methods should be bound to
classes.

>
> Thanks...
>
> --
>  _______                                        Karlo Lozovina - Mosor
> |   |   |.-----.-----.     web:http://www.mosor.net|| ICQ#: 10667163
> |       ||  _  |  _  |             Parce mihi domine quia Dalmata sum.
> |__|_|__||_____|_____|



Cheers


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to