
Show HN: Lazy – A Python library for rapidly developing lazy interfaces - bwasti
https://github.com/bwasti/lazy
======
qwerty456127
Cool. Won't it break if a function is "pure" from the practical point of view
but in fact uses some variables (e.g. configuration parameters) declared
outside of it?

~~~
bwasti
as long as configuration parameters remain fixed in the life of the execution
it is still pure, right?

~~~
qwerty456127
Yes, that's what I mean but I'm not sure from the theoretical point of view. I
used to believe a truly pure function isn't mean to access anything but what
is passed to it as an argument so it makes me wonder what a particular
implementation may expect. Whether or not this is Ok can also depend on a
particular language runtime or library (and I'm far from an expert in the
Python VM internals so far) - it can be impossible or quirky for a function
executed asynchronously to access something that belongs to outside of it.

~~~
bwasti
ah, the assumption is that even the remote call (for example, in the case of
async) is pure

