diff --git a/examples/units/basic_units.py b/examples/units/basic_units.py index 2a8e94887e95..0e62db1233e6 100644 --- a/examples/units/basic_units.py +++ b/examples/units/basic_units.py @@ -154,6 +154,9 @@ def __str__(self): def __len__(self): return len(self.value) + def __getitem__(self, key): + return TaggedValue(self.value[key], self.unit) + def __iter__(self): # Return a generator expression rather than use `yield`, so that # TypeError is raised by iter(self) if appropriate when checking for pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy