Changes between Version 1 and Version 2 of Ticket #34676, comment 3


Ignore:
Timestamp:
Jun 24, 2023, 9:39:37 AM (17 months ago)
Author:
Andrew Northall

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34676, comment 3

    v1 v2  
    55Thanks - if you'd rather not have a class, would it perhaps be better to normalise all unit not found exceptions to `AttributeError`?
    66
    7 `default_units()` already returns `AttributeError` if the units are not found (before I changed it in my PR), so would it be better just to make `unit_attname()` also return `AttributeError` to match (and hence retain backwards compatibility with people who may depend on `default_units()` returning `AttributeError`?
     7`default_units()` already returns `AttributeError` if the units are not found (before I changed it in my PR), so would it be better just to make `unit_attname()` also return `AttributeError` to match (and hence retain backwards compatibility with people who may depend on `default_units()` returning `AttributeError`)?
    88
    99Or would you leave `default_units()` as `AttributeError` and have `unit_attname()` return `ValueError`?
Back to Top