A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://packages.python.org/an_example_pypi_project/pkgcode.html below:

Documentation for the Code — an_example_pypi_project v0.0.5 documentation

Documentation for the Code¶

A pypi demonstration vehicle.

useful #1 – auto members¶

This is something I want to say that is not in the docstring.

Platforms: Unix, Windows

class an_example_pypi_project.useful_1.MyPublicClass(foo, bar='baz')¶

We use this as a public class example class.

You never call this class before calling public_fn_with_sphinxy_docstring().

Note

An example of intersphinx is this: you cannot use pickle on this class.

get_foobar(foo, bar=True)¶

This gets the foobar

This really should have a full function definition, but I am too lazy.

>>> print get_foobar(10, 20)
30
>>> print get_foobar('a', 'b')
ab

Isn’t that what you want?

an_example_pypi_project.useful_1.public_fn_with_googley_docstring(name, state=None)¶

This function does something.

Args:
name (str): The name to use.
Kwargs:
state (bool): Current state to be in.
Returns:

int. The return code:

0 -- Success!
1 -- No good. 
2 -- Try again. 
Raises:
AttributeError, KeyError

A really great idea. A way you might use me is

>>> print public_fn_with_googley_docstring(name='foo', state=None)
0

BTW, this always returns 0. NEVER use with MyPublicClass.

an_example_pypi_project.useful_1.public_fn_with_sphinxy_docstring(name, state=None)¶

This function does something.

Parameters: Returns:

int – the return code.

Raises:

AttributeError, KeyError

useful #2 – explicit members¶

This is something I want to say that is not in the docstring.

A very useful module indeed.

an_example_pypi_project.useful_2.public_fn_with_sphinxy_docstring(name, state=None)¶

This function does something.

Parameters: Returns:

int – the return code.

Raises:

AttributeError, KeyError

an_example_pypi_project.useful_2._private_fn_with_docstring(foo, bar='baz', foobarbas=None)¶
I have a docstring, but won’t be imported if you just use :members:.
class an_example_pypi_project.useful_2.MyPublicClass(foo, bar='baz')¶

We use this as a public class example class.

You never call this class before calling public_fn_with_sphinxy_docstring().

Note

An example of intersphinx is this: you cannot use pickle on this class.

get_foobar(foo, bar=True)¶

This gets the foobar

This really should have a full function definition, but I am too lazy.

>>> print get_foobar(10, 20)
30
>>> print get_foobar('a', 'b')
ab

Isn’t that what you want?

_get_baz(baz=None)¶

A private function to get baz.

This really should have a full function definition, but I am too lazy.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4