paul-hoehne / MarkLogic_Python

MarkLogic Python API for managing MarkLogic servers
Other
7 stars 8 forks source link

Fix a few small problems in the forests model #25

Closed ndw closed 9 years ago

ndw commented 9 years ago

In python3, it appears that "" is false, so I fixed a few tests in the constructor.

I also think it's a mistake to throw key errors so I added tests to some of the getters.

paul-hoehne commented 9 years ago

Thank you! I agree, t would be better to throw key errors when there's no value.

ndw commented 9 years ago

"It would be better to" or "it would be better not to"?

I'm in favor of returning None rather than throwing an exception, but I can't tell if you're agreeing or disagreeing :-)

paul-hoehne commented 9 years ago

Sorry, "not to." "Man use kompUTER not work gud."

paul-hoehne commented 9 years ago

Next time I get some time I'll sweep through some of he other APIs and make the same change to return None instead of a key error.