Skip to main content

funcname(func)

Returns a string to name func. I use this instead of func.__name__ because several things do not have a .__name__. It tries to use .__name__, but falls back to ..__str__().

@derived_property

Decorator for property functions which must be recomputed if another property is updated.

@derived_from(property_name)

Convenience wrapper of derived_property which names the parent property.

@returns_type(func, basetype)

Basis for decorators to do type checking of function return values. Example:

def returns_bool(func):
  ''' Decorator for functions which should return Booleans.
  '''
  return returns_type(func, bool)

@returns_bool
def f(x):
  return x == 1

This has been used for debugging functions called far from their definitions.

Release files for cs-py-func 20150115

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cs-py-func 20150115
File Size Uploaded
cs.py.func-20150115.tar.gz 2.8 kB Details

Release files / cs.py.func-20150115.tar.gz

Download URL cs.py.func-20150115.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bebe6a8770cf263cd7f63025b3441d4d1d4d01c6cdca76bab4db91975a1056c6
BLAKE2b-256 checksum
How to use checksums
929a448fdfd20c69cb426a798579eb5dcfbb11b33cc90ae3c066225995ce321c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page