Opened 2 years ago

Closed 2 years ago

#28353 closed defect (fixed)

var() with single-element list/tuple crashes with unhandled TypeError

Reported by: embray Owned by:
Priority: minor Milestone: sage-8.9
Component: symbolics Keywords:
Cc: Merged in:
Authors: Erik Bray Reviewers: Vincent Klein
Report Upstream: N/A Work issues:
Branch: 985e6a3 (Commits, GitHub, GitLab) Commit: 985e6a399bffa846d0b6edf038de2a7bc5140193
Dependencies: Stopgaps:

Status badges

Description

As reported on ask.sagemath.org:

sage: var(['x'])
Traceback (most recent call last):
...
TypeError: unhashable type: 'list'

I believe the most consistent behavior would be to still treat this similarly to a list of "multiple" names, and return a 1-tuple.

Change History (5)

comment:1 Changed 2 years ago by embray

  • Authors set to Erik Bray
  • Branch set to u/embray/configure/ticket-28353
  • Status changed from new to needs_review

comment:2 Changed 2 years ago by embray

  • Branch changed from u/embray/configure/ticket-28353 to u/embray/ticket-28353
  • Commit set to e20189e487b68cf01a4b4927fb348a7889fc856c

New commits:

ccf93e3Trac #28020: Gut and remove AX_CHECK_LIBLZMA and AX_CHECK_ZLIB
e20189eTrac #28353: More consistent treatment of "multiple variable" constructions

comment:3 Changed 2 years ago by git

  • Commit changed from e20189e487b68cf01a4b4927fb348a7889fc856c to 985e6a399bffa846d0b6edf038de2a7bc5140193

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

985e6a3Trac #28353: More consistent treatment of "multiple variable" constructions

comment:4 Changed 2 years ago by vklein

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

Looks good to me.

comment:5 Changed 2 years ago by vbraun

  • Branch changed from u/embray/ticket-28353 to 985e6a399bffa846d0b6edf038de2a7bc5140193
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.