Allow xmlfile.write() to accept a None

Bug #1465357 reported by Charlie_X on 2015-06-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
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.

scoder (scoder) wrote :
Changed in lxml:
assignee: nobody → scoder (scoder)
importance: Undecided → Wishlist
milestone: none → 3.9.0
status: New → Fix Committed
scoder (scoder) on 2017-09-19
Changed in lxml:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers