Multiple constructors

Philip Smith as006d4848 at blueyonder.co.uk
Sun Feb 6 06:36:00 EST 2005


Thanks to all of you

Some useful ideas in there, even if some of them stretch my current 
knowledge of the language.

C++ to Python is a steep 'unlearning' curve...

Phil

"Philip Smith" <as006d4848 at blueyonder.co.uk> wrote in message 
news:6SjNd.38337$K7.21639 at fe2.news.blueyonder.co.uk...
> Call this a C++ programmers hang-up if you like.
>
> I don't seem to be able to define multiple versions of __init__ in my 
> matrix class (ie to initialise either from a list of values or from 2 
> dimensions (rows/columns)).
>
> Even if Python couldn't resolve the __init__ to use on the basis of 
> argument types surely it could do so on the basis of argument numbers???
>
> At any rate - any suggestions how I code this????
>
> Thanks
>
> Phil
> 





More information about the Python-list mailing list