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

use locals() in growth group factory #19580

Open
dkrenn opened this issue Nov 13, 2015 · 15 comments
Open

use locals() in growth group factory #19580

dkrenn opened this issue Nov 13, 2015 · 15 comments

Comments

@dkrenn
Copy link
Contributor

dkrenn commented Nov 13, 2015

Make

sage: Z = ZZ
sage: GrowthGroup('n^Z')

working.

Depends on #19528

CC: @behackl @cheuberg

Component: asymptotic expansions

Author: Daniel Krenn

Branch/Commit: u/dkrenn/asy/locals @ fc7434a

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

@dkrenn
Copy link
Contributor Author

dkrenn commented Nov 13, 2015

Branch: u/dkrenn/asy/locals

@dkrenn
Copy link
Contributor Author

dkrenn commented Nov 13, 2015

New commits:

8989602function locals_of_caller
2a57f15use locals in repr_short_to_parent
39af603allow locals in GrowthGroupFactory
d4bbc88locals during construction of an asymptotic ring
81e5453locals in change_parameter

@dkrenn
Copy link
Contributor Author

dkrenn commented Nov 13, 2015

Commit: 81e5453

@dkrenn
Copy link
Contributor Author

dkrenn commented Nov 13, 2015

Author: Daniel Krenn

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 13, 2015

Changed commit from 81e5453 to c264579

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 13, 2015

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

421e377mutable poset map: remove elements ``None``
1d28240term monoid: write change_parameter
2c37889correct a bug in change_parameter
bdcb72bwrite map_coefficients
c264579Merge branch 'asy/map_coefficients' into asy/locals

@dkrenn
Copy link
Contributor Author

dkrenn commented Nov 13, 2015

comment:4

Merged in #19528 due to a merge conflict.

@dkrenn
Copy link
Contributor Author

dkrenn commented Nov 13, 2015

Dependencies: #19528

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 13, 2015

Changed commit from c264579 to 5f884c5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 13, 2015

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

5f884c5complete merge

@nbruin
Copy link
Contributor

nbruin commented Nov 13, 2015

comment:6

Would it be possible to just not do this? It's a strong indication of bad design if you end up parsing strings wrt. locals/globals dictionaries. Variable names do not belong in strings.

You'll probably get scoping/shadowing in the different dictionaries wrong. E.g. what about

[GrowthGroup("n^Z") for Z in [1..10]]

and, subtly different,

list(GrowthGroup("n^Z") for Z in [1..10])

And what would

[GrowthGroup("n^Z") for n in [1..10] for Z in [1..10]]

do? I know: it probably gives errors because it's not passing the right values here, but what is different about n wrt. Z that one name needs to be looked up in a scope and the other doesn't?

If you need a construction like this, then something along the lines

PreGrowthGroup("n")^Z

is probably much safer.

You might want to check on sage-devel what the opinions of other developers are about letting local/global variable names sneak into strings.

@cheuberg
Copy link
Contributor

cheuberg commented Jan 5, 2017

comment:7

does not merge (cf. patchbot)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 5, 2017

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

f396470Trac #19850: use absolute imports
fc7434aMerge tag '7.5.rc1' into t/19580/asy/locals

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 5, 2017

Changed commit from 5f884c5 to fc7434a

@fchapoton
Copy link
Contributor

comment:10

branch does no longer apply

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

4 participants