python Programming Glossary: theirnumber
How to replace an instance in __init__() with a different object? http://stackoverflow.com/questions/3209233/how-to-replace-an-instance-in-init-with-a-different-object __init__.py import ClassB class ClassA def __init__ self theirnumber if theirnumber 10 # all big numbers should be ClassB objects.. ClassB class ClassA def __init__ self theirnumber if theirnumber 10 # all big numbers should be ClassB objects self ClassB.ClassB.. big numbers should be ClassB objects self ClassB.ClassB theirnumber return else # numbers under 10 are ok in ClassA. return in ClassB..
|