On May 23, 5:51 pm, Félix C. Morency <
felix.more...@gmail.com> wrote:
> @Christian: Thanks for pointing that out!
>
> I agree with Eli on the fact that the data shouldn't be modified
> without notice. The flag solution could fit our needs. I will push a
> fix soon.
I'll definitely pull this into pydicom when the details are worked
out.
On a related note, is it possible to write some basic unit tests for
this? They couldn't check for specific UIDs returned, but perhaps for
handling prefix with/without trailing dot, raising the exception where
appropriate, any possible border cases?
Another thought as I look at the code again ... I think the string
should be returned as a UID class instance rather than a regular
string. At the moment the UID class doesn't offer anything for this
use case, but perhaps in future it might (e.g. could check for valid
values on initialization).
One more little thing -- I've been trying to convert to the
'modern' (standard in python 3) format() function for string
expressions, rather than the % string interpolation. Do you mind
adding that as another minor change?
- Darcy