pygeodesy 24.9.24__py2.py3-none-any.whl → 24.9.29__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pygeodesy/streprs.py CHANGED
@@ -22,7 +22,7 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _dunder_nameof
22
22
  from math import fabs, log10 as _log10
23
23
 
24
24
  __all__ = _ALL_LAZY.streprs
25
- __version__ = '24.08.13'
25
+ __version__ = '24.09.28'
26
26
 
27
27
  _at_ = 'at' # PYCHOK used!
28
28
  _EN_PREC = 6 # max MGRS/OSGR precision, 1 micrometer
@@ -535,26 +535,33 @@ def strs(objs, prec=6, fmt=Fmt.F, ints=False):
535
535
  return tuple(_streprs(prec, objs, fmt, ints, False, str)) if objs else ()
536
536
 
537
537
 
538
- def unstr(where, *args, **kwds):
538
+ def unstr(where, *args, **kwds_):
539
539
  '''Return the string representation of an invokation.
540
540
 
541
541
  @arg where: Class, function, method (C{type}) or name (C{str}).
542
542
  @arg args: Optional positional arguments.
543
- @kwarg kwds: Optional keyword arguments, except C{B{_fmt}=Fmt.g}
544
- and C{B{_ELLIPSIS}=False}.
543
+ @kwarg kwds_: Optional keyword arguments, except C{B{_Cdot}=None},
544
+ C{B{_ELLIPSIS}=False} and C{B{_fmt}=Fmt.g}.
545
545
 
546
546
  @return: Representation (C{str}).
547
547
  '''
548
- def _e_g_kwds3(_ELLIPSIS=False, _fmt=Fmt.g, **kwds):
549
- return _ELLIPSIS, _fmt, kwds
548
+ def _C_e_g_kwds3(_Cdot=None, _ELLIPSIS=False, _fmt=Fmt.g, **kwds):
549
+ return _Cdot, _ELLIPSIS, _fmt, kwds
550
550
 
551
- e, g, kwds = _e_g_kwds3(**kwds)
551
+ C, e, g, kwds = _C_e_g_kwds3(**kwds_)
552
552
  t = reprs(args, fmt=g) if args else ()
553
553
  if e:
554
554
  t += _ELLIPSIS_,
555
555
  if kwds:
556
556
  t += pairs(itemsorted(kwds), fmt=g)
557
557
  n = where if isstr(where) else _dunder_nameof(where) # _NN_
558
+ if C and hasattr(C, n):
559
+ try: # bound method of class C?
560
+ where = where.__func__
561
+ except AttributeError:
562
+ pass # method of C?
563
+ if getattr(C, n, None) is where:
564
+ n = _DOT_(_dunder_nameof(C), n)
558
565
  return Fmt.PAREN(n, _COMMASPACE_.join(t))
559
566
 
560
567