xonsh / lazyasd

Lazy & self-destructive tools for speeding up module imports
http://xon.sh
BSD 3-Clause "New" or "Revised" License
52 stars 8 forks source link

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

Open spacebuoy opened 6 years ago

spacebuoy commented 6 years ago

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 commented 6 years ago

Hi @spacebuoy - yes, this is totally safe.

con-f-use commented 2 years ago

@scopatz it is not "totally save":

image