[sage-devel] Re: cached data in a class instance

2008-02-21 Thread Nick Alexander
>> 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. This is my preferred solution at all times. Nick --~

[sage-devel] Re: cached data in a class instance

2008-02-21 Thread John Cremona
On 21/02/2008, William Stein <[EMAIL PROTECTED]> wrote: > > 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

[sage-devel] Re: cached data in a class instance

2008-02-21 Thread William Stein
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

[sage-devel] Re: cached data in a class instance

2008-02-21 Thread John Cremona
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

[sage-devel] Re: cached data in a class instance

2008-02-21 Thread David Harvey
On Feb 21, 2008, at 1:18 PM, John Cremona wrote: > > Can someone point me to the documentation for the feature where, > for example, > > E.__order > > is translated to > > E._EllipticCurve_finite_field__order ? > > It appears that in several places where I thought I was caching data, > I am not