I'm using Python only for some months now and I'm wondering, whether such
assignments as above are creating bitwise copies of an object or just
recieve a reference. That means I wanted to know, wheter Python in general
differs between references and copies:
class someclass:
def __init__( self, otherobject):
self.someattrib ute = otherobject
And my second question is, whether I should use a cast in such cases or
not (I know, a cast isn't mandatory here...)
Thanks a lot!
assignments as above are creating bitwise copies of an object or just
recieve a reference. That means I wanted to know, wheter Python in general
differs between references and copies:
class someclass:
def __init__( self, otherobject):
self.someattrib ute = otherobject
And my second question is, whether I should use a cast in such cases or
not (I know, a cast isn't mandatory here...)
Thanks a lot!
Comment