| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report
@@ Coverage Diff @@
## master #1021 +/- ##
=======================================
Coverage 86.71% 86.71%
=======================================
Files 1 1
Lines 301 301
=======================================
Hits 261 261
Misses 40 40
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
@filmor any chance to look at this? This is a pretty light change. |
Sorry, something went wrong.
| /// <summary> | ||
| /// Gets the specified attribute. If attribute is not found, returns the fallback value. | ||
| /// </summary> | ||
| public PyObject GetAttrOrElse(string name, PyObject _default) |
There was a problem hiding this comment.
How much would it hurt to make this behaviour the default? We are using GetAttr a lot, I think (even in this file).
Sorry, something went wrong.
There was a problem hiding this comment.
@filmor I don't know, I don't have any legacy code :)
But that would be a breaking change in contract.
Sorry, something went wrong.
There was a problem hiding this comment.
I decided to take this change out, so the rest could be merged.
Sorry, something went wrong.
|
Almost completely fine, but I'm not quite sure about the GetAttr changes, in particular since GetAttr(PyObject) is unchanged AFAICT. Will have a closer look. |
Sorry, something went wrong.
|
@filmor I decided to take the GetAttrOrElse out for now so that the rest could be merged. Created issue #1036 |
Sorry, something went wrong.
* added parameter validation to PyObject methods
| Back | FazBrowse Home | New Git URL |
What does this implement/fix? Explain your changes.
This adds basic validations to input parameters of various PyObject methods, which should help in debugging code, that uses Python.NET.
Also adds a few function overloads
Does this close any currently open issues?
No, but it reduces divergence with Lost Tech fork
Checklist
Check all those that are applicable and complete.