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

LazyObject works awesomely even in dict creation, is it safe? #7

Open
spacebuoy opened this issue Jan 18, 2018 · 2 comments
Open

LazyObject works awesomely even in dict creation, is it safe? #7

spacebuoy opened this issue Jan 18, 2018 · 2 comments
Labels

Comments

@spacebuoy
Copy link

LazyObject even works in dict, delays as expected:

meta = {
'some items': blah,
'Test': {
're5': LazyObject(lambda: Meta.compile1(b'^(?:def|class) '),
locals(), "meta['Test']['re5']"),
},
}

Is it safe to include LazyObject in dict creation?

@scopatz
Copy link
Member

scopatz commented Mar 20, 2018

Hi @spacebuoy - yes, this is totally safe.

@con-f-use
Copy link
Contributor

@scopatz it is not "totally save":

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants