Ticket #2163 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

[with patch, positive review] .show?? pops up the graphics item as well as the help page

Reported by: jason Owned by: mhansen
Priority: major Milestone: sage-3.2.2
Component: graphics Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

At the command line:

sage: a=plot(x^2,(x,-1,1))
sage: a.show??
sage: a.show?

In either of the last two commands, the plot pops up on my Ubuntu 7.10 box (as well as the help).

Attachments

trac_2163.patch Download (5.1 KB) - added by mhansen 4 years ago.

Change History

comment:1 Changed 5 years ago by mabshoff

  • Milestone set to sage-2.10.2

comment:2 Changed 5 years ago by mabshoff

  • Component changed from algebraic geometry to graphics

comment:3 Changed 5 years ago by mhansen

  • Owner changed from was to mhansen
  • Status changed from new to assigned

This is due to the following:

String Form:    <bound method Graphics.show of >

whereas after show_default(False), we get:

String Form:    <bound method Graphics.show of Graphics object consisting of 1 graphics primitive>

comment:4 Changed 5 years ago by mhansen

This can be fixed if we can tell IPython to set show_default(False) when doing things like repr(a.show)

comment:5 Changed 5 years ago by mhansen

  • Status changed from assigned to closed
  • Resolution set to fixed

comment:6 Changed 5 years ago by mhansen

  • Status changed from closed to reopened
  • Resolution fixed deleted

Changed 4 years ago by mhansen

comment:7 Changed 4 years ago by mhansen

  • Summary changed from .show?? pops up the graphics item as well as the help page to [with patch, needs review] .show?? pops up the graphics item as well as the help page

I had already fixed some problems caused by removing the 'nodoctest' at the top before realizing there's no good way to test the function which I added.

The thing which addresses this ticket is the last hunk at the bottom of the patch.

comment:8 Changed 4 years ago by jason

  • Summary changed from [with patch, needs review] .show?? pops up the graphics item as well as the help page to [with patch, positive review] .show?? pops up the graphics item as well as the help page

This fixes the problem. Tests pass in interpreter.py as well (thanks for fixing all those too!)

Positive review.

comment:9 Changed 4 years ago by mabshoff

  • Status changed from reopened to closed
  • Resolution set to fixed

Merged in Sage 3.2.2.alpha0

Note: See TracTickets for help on using tickets.