On Thu, Feb 21, 2008 at 10:43 AM, John Cremona <[EMAIL PROTECTED]> wrote: > > OK, that makes sense to me (used to private data in C++ classes). > Here the owning class is an ellipti curve, but I want points on that > curve to access the "private" data. In C++ this would be done by > decalring tha points were "friends" of curves. But here, I guess the > correct thing is for other classes to use the full name, in this case > _EllipticCurve_finite_field__order >
I avoid using that at all ever, since it is so brittle. Usually when you're doing this sort of thing you're writing code that is going to break later when you or somebody else tries to change it -- so make sure you put in some clear comments! You can use a single underscore to indicate "private-ish, but not so private", e.g., change self.__order to self._order and then there will be no name mangling. But users still no they aren't supposed to muck with order. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---