On 5 February 2010 16:18, William Stein <wst...@gmail.com> wrote:
> On Fri, Feb 5, 2010 at 8:12 AM, John Cremona <john.crem...@gmail.com> wrote:
>> Here's the explanation.  I had thought that check=False just stops the
>> check that the equations are satisfied (I posted an examples where
>> there were no equations which perhaps hid my point;  I found this
>> while constructing points on a curve in P^2).  But in fact it checks
>> nothing at all.
>>
>> All I would want to do is change the line self._coords = v to
>> self._coords = list(v) at the appropriate place.  If that failed, then
>> it's the user's false.  In this case it did not fail and almost
>> everything worked, except that I got inconsistencies in sorting points
>> since the sort function tearted a point with _coords as list
>> differently from points with _coords as tuple!
>
> But the reason for check=False is that it is useful for writing
> internal code, where you want
> to avoid the potentially substantial overhead of operations such as "list(v)".

I did not know that was potentially expensive.  If so, let the code be
as it is -- but then whenever a function has a "check-False" option
the exact correct input should be documented.  Which it is NOT at
present:

sage: F = GF(2^6,'a')
sage: P2.<X,Y,Z> = ProjectiveSpace(F,2)
sage: C = Curve(X^5+11*X*Y*Z^3 + X^2*Y^3 - 13*Y^2*Z^3)
sage: C.point?
Type:           instancemethod
Base Class:     <type 'instancemethod'>
String Form:    <bound method ProjectiveCurve_finite_field.point of
Projective Curve over Finite Field in a of size 2^6 defined by X^5 +
X^2*Y^3 + X*Y*Z^3 + Y^2*Z^3>
Namespace:      Interactive
File:           
/home/jec/sage-4.3.2.rc0/local/lib/python2.6/site-packages/sage/schemes/generic/scheme.py
Definition:     C.point(self, v, check=True)
Docstring:
    x.__init__(...) initializes x; see x.__class__.__doc__ for signature

I made assumptions about using check=False, and was wrong, and got stung!

John

>
> Maybe we need another option?  E.g., check_ring or something?
>
>  -- William
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to