You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"make a callable factory and initialize it with a fullname" is literally one line:
fromfunctoolsimportpartialdefget_type_analyze_hook(fullname):
ifinteresting_name(fullname):
returnpartial(my_hook, fullname)
returnNonedefmy_hook(fullname, ctx):
# you have fullname here
...
Do we really need to add this field to the context (then why not to all contexts) if one can get it (if necessary) with a single line? After all Python is not Java.
In the hooks returned from
user needs to create
Instance
objects in the hook, sofullname
required there, butUnboundType
does not have it.Surely, user can make a callable factory and initialize it wil a fullname, but it would be so much easier just to get it from context object.
The text was updated successfully, but these errors were encountered: