- Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
Currently, hasproperty(o, attr) works by falling back to Julia's default method, which checks attr in propertynames(o). This is functional but rather inefficient because it first constructs the propertynames list.
Since you already have an optimized pyhasattr method, it seems like you should just define:
hasproperty(o::Py, attr::Symbol) = hasproperty(o, String(attr)) hasproperty(o::Py, attr::AbstractString) = pyhasattr(o, attr) Metadata
Metadata
Assignees
Labels
No labels