Opened 3 years ago

Closed 3 years ago

#28353 closed defect (fixed)

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

Reported by: Erik Bray 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


As reported on

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 3 years ago by Erik Bray

Authors: Erik Bray
Branch: u/embray/configure/ticket-28353
Status: newneeds_review

comment:2 Changed 3 years ago by Erik Bray

Branch: u/embray/configure/ticket-28353u/embray/ticket-28353
Commit: 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 3 years ago by git

Commit: e20189e487b68cf01a4b4927fb348a7889fc856c985e6a399bffa846d0b6edf038de2a7bc5140193

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 3 years ago by vklein

Reviewers: Vincent Klein
Status: needs_reviewpositive_review

Looks good to me.

comment:5 Changed 3 years ago by Volker Braun

Branch: u/embray/ticket-28353985e6a399bffa846d0b6edf038de2a7bc5140193
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.