Opened 8 months ago

Closed 8 months ago

#28563 closed enhancement (fixed)

Manifolds: Dicts and Lists Copied

Reported by: gh-DeRhamSource Owned by:
Priority: major Milestone: sage-9.0
Component: geometry Keywords: manifolds, lists
Cc: tscrim, egourgoulhon Merged in:
Authors: Michael Jung Reviewers: Travis Scrimshaw, Eric Gourgoulhon
Report Upstream: N/A Work issues:
Branch: 0bdf671 (Commits) Commit: 0bdf671d72da33d2dd7c9d8ad4c3c9a802f8c7ee
Dependencies: Stopgaps:

Description (last modified by gh-DeRhamSource)

Internal lists and dictionaries should not be altered by the user. In order to avoid such things, methods should always return a shallow copy.

Change History (8)

comment:1 Changed 8 months ago by gh-DeRhamSource

  • Authors set to Michael Jung
  • Cc tscrim egourgoulhon added
  • Component changed from PLEASE CHANGE to geometry
  • Description modified (diff)
  • Keywords manifolds lists added
  • Type changed from PLEASE CHANGE to enhancement

comment:2 Changed 8 months ago by gh-DeRhamSource

  • Branch set to u/gh-DeRhamSource/manifolds__dicts_and_lists_copied

comment:3 Changed 8 months ago by gh-DeRhamSource

  • Commit set to 736e973e7c2853c6072a4fb33cc32bfa271d0f30
  • Reviewers set to Travis Scrimshaw, Eric Gourgoulhon
  • Status changed from new to needs_review

New commits:

736e973Return shallow copies

comment:4 Changed 8 months ago by tscrim

Tuples are (shallowly) immutable, so there is no point in doing tuple(a_tuple_instance).

comment:5 Changed 8 months ago by git

  • Commit changed from 736e973e7c2853c6072a4fb33cc32bfa271d0f30 to 0bdf671d72da33d2dd7c9d8ad4c3c9a802f8c7ee

Branch pushed to git repo; I updated commit sha1. New commits:

0bdf671Tuples already immutable

comment:6 Changed 8 months ago by gh-DeRhamSource

Changed.

comment:7 Changed 8 months ago by egourgoulhon

  • Status changed from needs_review to positive_review

LGTM. Thanks.

comment:8 Changed 8 months ago by vbraun

  • Branch changed from u/gh-DeRhamSource/manifolds__dicts_and_lists_copied to 0bdf671d72da33d2dd7c9d8ad4c3c9a802f8c7ee
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.