On 08/07/2013 11:38 PM, Tobias Weich wrote:
Hi,
durings some work on the unification of linestyle options I found the
following little bug:

|
var('y')
plot_vector_field((sin(x),cos(y)),(x,-3,3),(y,-3,3),linestyle='dotted')
|

crashes with a "maximum recursion depth" error|.

One would however expect that it prints out a warning, that the
linestyle option is ignored, togehter with a lis of the allowed options.

The reason| for this problem is simple: .options() checks whether there
are unknown options and if this is the case prints a warning. While
printing this it calls ._repr_. Unfortunately in .plot_field.py the
function ._repr_() calls options again which reates the infinite loop:

|
def_repr_(self):
"""
         String representation of PlotField graphics primitive.

         EXAMPLES::

             sage: x,y = var('x,y')
             sage: P=plot_vector_field((sin(x), cos(y)), (x,-3,3), (y,-3,3))
             sage: P[0]
             PlotField defined by a 20 x 20 vector grid
         """
return"PlotField defined by a %s x %s vector
grid"%(self.options()['plot_points'],self.options()['plot_points'])

|

I would propose openig a ticket and uploading a patch which replaces
|
self.options()
|
by
|
self._options
|

However being completely unexperienced with fixing bugs in sage I wanted
to mail it to the list first and ask whether some more experienced
developpers see some problems, better solutions or other functions that
could be affacted.

Thanks for your feed-back

Tobi

Did you open a ticket about this bug? If so, can you mention the ticket here? Thanks!




--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to