Over the past few months I've noticed our code is crawling with code like:
pyxb_obj = [x for x in pyxb_generated.simpleType.iteritems() if x.value()=='Some Value From Database']
Where we want the PyXB generated object for a given constant value. JAXB has a really nice fromValue() method, which works like:
jaxbObject = simpleType.fromValue("Some Value From Database")
I've had a bit of a dig around PyXB, doing dir() on pyxb_generated.simpleType, etc. and can't see an equivalent. It would be really nice if PyXB had the fromValue() convenience / helper method. It would certainly clean up our code.