[Tutor] Objects, persistence & getting

Liam Clarke cyresse at gmail.com
Sun Jan 16 22:13:27 CET 2005


Hi all,

Well, one thing learning Java is good for is for thoroughly
demystifying OOP. It's not some magical acronym of programming
goodness, it's just an 'organic' way to organise code.
That, and it looks good on your CV, even if you won't be using it. Like XML.

It's got me thinking about object persistence, though, and plotting as
to how I can use this for my own nefarious ends.

If I understand correctly, once an object is created, as long as
references to it exist, it isn't garbage collected.

So, if module a.py creates an instance of class foo, can method bar in
module b.py access foo without foo being passed directly to bar?

Does that make sense? So, foo is floating around in the namespace, and
bar just wants to grab a field of foo. Can it? I had a poke around the
namespace yesterday, and got lost in hordes of methods that look like
__this__, which is ugly.

Regards,

Liam Clarke
-- 
'There is only one basic human right, and that is to do as you damn well please.
And with it comes the only basic human duty, to take the consequences.


More information about the Tutor mailing list