Allow xmlfile.write() to accept a None
Bug #1465357 reported by
Charlie_X
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Wishlist
|
scoder |
Bug Description
This is a convenience request that xmlfile.write(None) should not raise an exception as it currently does. I find it fairly common to have to want to pass elements coming from functions or methods that might return an Element or None. This means wrapping the call to xmlfile.write() in conditional code whereas "do nothing" is required. I don't know if this is a common use case but I can imagine it might be.
Changed in lxml: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Seems reasonable and won't hurt. /github. com/lxml/ lxml/commit/ 904c9742b23914c e772a4c10013855 b0996d5f73
https:/