Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup variable factories #18390

Open
videlec opened this issue May 9, 2015 · 3 comments
Open

cleanup variable factories #18390

videlec opened this issue May 9, 2015 · 3 comments

Comments

@videlec
Copy link
Contributor

videlec commented May 9, 2015

Various parents need to create variable names (the polynomial rings, free algebras, groups, the symbolic ring, etc). We fusion all of them.

  1. the following will now raise TypeError
sage: R.<a,b> = PolynomialRing(QQ, ('a', 'b'))
sage: A.<x,y,z> = FreeAlgebra(QQ, 'x,y,z')

(see the "polynomial ring" thread)

  1. The many versions are normalize_names are fused in sage.misc.variables.normalize_names

  2. Deprecations:

    • the var_array argument in PolynomialRing
    • the methods normalize_names, _certify_name of CategoryObject
  3. Problems with injection of reserved names

sage: a = SR.var('or')   # this should work
Traceback (most recent call last):
...
ValueError: The name "or" is not a valid Python identifier.
sage: QQ['or'].inject_variables()   # this should not
Defining or

note: should take care of '_', 'True', 'False', 'None' and builtins (see the "reserved name for variables" thread)

As a sided effect, we got some speedup in polynomial ring creation!

See also:

CC: @mforets

Component: algebra

Author: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/18390

@videlec videlec added this to the sage-6.7 milestone May 9, 2015
@videlec

This comment has been minimized.

@videlec videlec changed the title cleanup polynomial ring factory cleanup variable factories May 9, 2015
@videlec

This comment has been minimized.

@videlec

This comment has been minimized.

@mkoeppe mkoeppe removed this from the sage-6.7 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants