Opened 14 years ago

Closed 14 years ago

#4037 closed defect (fixed)

[with trivial patch, with positive review] list_of_first_n() broken in interact.py

Reported by: AlexGhitza Owned by: AlexGhitza
Priority: minor Milestone: sage-3.1.2
Component: interact Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

In server/notebook/interact.py, the function list_of_first_n() claims to return n elements, but it returns n+1 of them. The attached trivial patch fixes the function and the doctests.

Attachments (1)

4037-interact_list_of_first_n.patch (1.1 KB) - added by AlexGhitza 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by AlexGhitza

comment:1 Changed 14 years ago by cremona

  • Summary changed from [with trivial patch, needs review] list_of_first_n() broken in interact.py to [with trivial patch, with positive review] list_of_first_n() broken in interact.py

Ok, a simple out-by-one bug. Patch applies cleanly to 3.1.2.alpha3 and doctests in sage.server.notebook all pass.

OK by me, though I usually steer clear of notebook patches as I rarely use the notebook!

comment:2 Changed 14 years ago by mabshoff

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

Merged in Sage 3.1.2.alpha4

Note: See TracTickets for help on using tickets.