This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

library with some helper functions that make more functions for you.

check it out

make a plucker with pluck:

from fnny import pluck as p
from collections import namedtuple
G = namedtuple("G", ["a"])
guys = [G(i) for i in range(10)]
expected = sum(map(lambda x: x.a, guys))
actual = sum(map(p.a, guys))
assert expected == actual

call a method with method:

from fnny import method as m
from test.test_it import _Argless()
no_args = [_Argless() for a in range(10)]
expected = list(map(lambda x: x.wow(), no_args))
actual = list(map(m.wow, no_args))
assert expected == actual

use a partially applied method with partial:

from fnny import partial as pa
from test.test_it import _OneArg()
has_args = [_OneArg() for a in range(10)]
expected = list(map(lambda x: x.add(1), has_args))
actual = list(map(pa.add(1), has_args))
assert expected == actual

partial even supports kwargs:

from test.test_it import _OneKwarg()
has_args = [_OneKwarg() for a in range(10)]
expected = list(map(lambda x: x.derp(something="heyy"), has_args))
actual = list(map(pa.derp(something="heyy"), has_args))
assert expected == actual

but actually, python already has a way more idiomatic way to do all of the above:

guys = [G(i) for i in range(10)]
assert sum(map(lambda x: x.a, guys)) == sum(g.a for g in guys)

no_args = [_Argless() for a in range(10)]
expected = list(map(lambda x: x.wow(), no_args))
actual = [argless.wow() for argless in no_args]
assert expected == actual

has_args = [_OneArg() for a in range(10)]
expected = list(map(lambda x: x.add(1), has_args))
actual = [one.add(1) for one in has_args]
assert expected == actual

has_kwargs = [_OneKwarg() for a in range(10)]
expected = list(map(lambda x: x.derp(something="heyy"), has_kwargs))
actual = [kw.derp(something="heyy") for kw in has_kwargs]
assert expected == actual

But maybe there’s still a place for a discriptor-based lib for function generation.

I’ll add examples as soon as I think of them, I guess.

Release History

Release History

0.0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
fnny-0.0.2.tar.gz (2.5 kB) Copy SHA256 Checksum SHA256 Source Nov 18, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting