Anselm Kiefner

Results 61 comments of Anselm Kiefner

Hmm.. initially, I wasn't thinking of relative `import` from online resources, but I won't complain if it's possible to adapt the mechanism from `use(Path("foo.py"))` to `import foo`, just keep in...

With import_to_use #31 proposed, I think this one should be named "path_to_url" to make the distinction perfectly clear.

@thirteenpylons have fun and feel free to experiment ;) we could even introduce a new case for github urls like `use(use.GIT("amogorkon/justuse"))` or somesuch if it helps.

https://github.com/amogorkon/justuse/issues/141#issuecomment-1083516382 suggests that we have `use.apply_aspect(mod, decorator, warns=True, output="aspect.log")` or somesuch to explicitely warn/log/print failed attempts at applying a decorator.

https://github.com/macsnoeren/python-p2p-network could be an inspiration/template

Hehe.. well, I wished it was all that simple. At the moment we just recycle inspect.isfunction, thus only catch pure functions and only go through the first level with no...

@leycec the broadest and most naive check function for beartype I guess would be ``` def beartypeable(obj): try: beartype(obj) return True except: return False ``` maybe we can narrow it...

After realizing that `object.__getattribute__` is the only reliable source of truth regarding attribute discovery, I was able to simplify the aspectizing code quite a bit and make deep recursion work....

Also, there's one *small* issue with closures ``` def f(): def g(): print("foo") >>> f.g Traceback (most recent call last): File "", line 1, in AttributeError: 'function' object has no...

> What about properties? methods? classes that act like functions either by `__init__` or `__call__` .. and now we're wrestling with Enum members that have some `__func__` causing recursion like...