mellowdrifter / python-bgpstuff.net

Apache License 2.0
3 stars 1 forks source link

Objects and functions should be documented #3

Open mellowdrifter opened 3 years ago

mellowdrifter commented 3 years ago

In the correct Pythonic format

crankynetman commented 3 years ago

When you say correct Pythonic format, do you mean something like this?


def some_function(arg1, arg2, optional_arg='Some String'):
    '''Runs some stuff on some things and then spits out the end result
    depending on the stuff you put into it. 
    Args:
        arg1 (list): List of things (str) that you want to run the
        function on.

        arg2 (integer): The number of times you want to perform this
        function.

        optional_arg (string): A flag to change the way the function does
        stuff.

    Returns:
        result_list (list): A list results generated by the function.
    '''
mellowdrifter commented 3 years ago

That's it yes!

On Mon, 1 Feb 2021, 21:20 Chris Cummings, notifications@github.com wrote:

When you say correct Pythonic format, do you mean something like this?

def some_function(arg1, arg2, optional_arg='Some String'): '''Runs some stuff on some things and then spits out the end result depending on the stuff you put into it. Args: arg1 (list): List of things (str) that you want to run the function on. arg2 (integer): The number of times you want to perform this function. optional_arg (string): A flag to change the way the function does stuff. Returns: result_list (list): A list results generated by the function. '''

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mellowdrifter/python-bgpstuff.net/issues/3#issuecomment-771299995, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQFHWA6EMF6VVZMIFTPMD3S45OQNANCNFSM4W5X7NVA .

crankynetman commented 3 years ago

Cool, I'm gonna poke at this!

crankynetman commented 3 years ago

Added a first stab at things