Skip to content

Commit

Permalink
Do not add __bool__via templates
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-urbanczyk committed Feb 10, 2023
1 parent a676f3b commit f3bcde7
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions bindgen/template_sub.j2
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,6 @@ py::object klass;
)
{% endif %}
{%- endfor -%}
// special python methods
{% if "IsDone" in c.methods_dict %}
.def("__bool__",[](const {{c.name}} &self)
{ return self.IsDone(); }
)
{% elif "IsNull" in c.methods_dict %}
.def("__bool__",[](const {{c.name}} &self)
{ return self.IsNull(); }
)
{% endif %}
;
{% endif %}{% endfor %}

Expand Down

0 comments on commit f3bcde7

Please sign in to comment.