add a little neon to your python
Project description
Welcome to neonpy
Warning
neonpy is an entirely experimental library consisting largely of decorators I think will be useful to me. I may be very wrong. neonpy comes with no warranty.
Basic philosophy
- Per function logging
- Distinguish between mutable and immutable
- Fix code quickly
@normalize_fields
@normalize_fields(bar=lambda x: x.lower())
@normalize_fields(foo=lambda x: x.lower(), quux=lambda x: x.upper())
def myfunction(foo, bar="PET", quux="motor"):
x = 5
print(foo, bar, quux)
myfunction("my", "PIGEON", "Pie")
myfunction("MY")
myfunction("MY", "CAT")
myfunction("my", "CAT")
myfunction("MY", "dog")
@memoize
WARNING: Do not use this if you are using objects that are hashable but not immutable
@memoize
def fib(a):
if a < 2:
return 1
return fib(a-1) + fib(a-2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
neonpy-0.0.1.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neonpy-0.0.1.tar.gz.
File metadata
- Download URL: neonpy-0.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c59ebf83b60ac1a4a5e5aad87bb4bdb711437c5a24027f5ec7a5b98f2f95d2c5
|
|
| MD5 |
7bebf96b0ce782e503a1febc99951155
|
|
| BLAKE2b-256 |
dfb9daa365f7c9d0870dc23ba6f9afc5f464830ed925a22156cfa41fed2f57cf
|
File details
Details for the file neonpy-0.0.1-py3-none-any.whl.
File metadata
- Download URL: neonpy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff5ae018ea2010b6f2952e7aa7fccaaa9a93661f0f2db6b37a4ef4141be3beca
|
|
| MD5 |
6544819b3d570e0faeff551a0bdbbf83
|
|
| BLAKE2b-256 |
3449c70ec188f14ffe5ec3dd47552207cd9c8e89964185ed6f940fce35d63ace
|