Opened 6 years ago

Closed 3 years ago

Last modified 3 years ago

#14490 closed defect (fixed)

point2d(iter([])) raises ValueError

Reported by: slabbe Owned by: jason, was
Priority: major Milestone: sage-7.3
Component: graphics Keywords:
Cc: Merged in:
Authors: Frédéric Chapoton Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: 136a25e (Commits) Commit:
Dependencies: Stopgaps:

Description

I just came up with the following bug. point2d takes list as input (possibly empty). It also takes an iterator as input, but it must be non empty which is not fun :

sage: point2d([])     # works, return empty graphic
sage: point2d(iter([]))
Traceback (most recent call last):
...
ValueError: points must have 2 coordinates in a 2d line

Change History (11)

comment:1 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:2 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:3 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:5 Changed 3 years ago by jakobkroeker

  • Status changed from new to needs_info

seems fixed in recent sage

comment:6 Changed 3 years ago by chapoton

  • Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
  • Status changed from needs_info to needs_review

comment:7 Changed 3 years ago by vdelecroix

Since it was fixed by accident, it would be nice to add a doctest...

comment:8 Changed 3 years ago by chapoton

  • Authors set to Frédéric Chapoton
  • Branch set to public/14490
  • Commit set to 136a25e96a9a26a5f1d51497f084fbabf1227f23
  • Milestone changed from sage-duplicate/invalid/wontfix to sage-7.3

done, please review


New commits:

136a25etrac 14490 adding doctest

comment:9 Changed 3 years ago by vdelecroix

  • Reviewers set to Vincent Delecroix
  • Status changed from needs_review to positive_review

comment:10 Changed 3 years ago by vbraun

  • Branch changed from public/14490 to 136a25e96a9a26a5f1d51497f084fbabf1227f23
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:11 Changed 3 years ago by slabbe

  • Commit 136a25e96a9a26a5f1d51497f084fbabf1227f23 deleted

For reference, this ticket also solved #10948.

Note: See TracTickets for help on using tickets.