"John Roth" <[EMAIL PROTECTED]> writes: > I'd suggest making them public rather than either protected or > private. There's a precident with the complex module, where > the real and imaginary parts are exposed as .real and .imag.
This isn't addressed in the PEP, and is an oversight on my part. I'm against making them public, as Rational's should be immutable. Making the two features public invites people to change them, meaning that machinery has to be put in place to prevent that. That means either making all attribute access go through __getattribute__ for new-style classes, or making them old-style classes, which is discouraged. If the class is reimplented in C, making them read-only attributes as they are in complex makes sense, and should be considered at that time. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list