Skip to content

Enhance documentation with brief, high-level descriptions/usage of patterns #53

Closed

Description

@dsoprea

I'd hate to think that I'm the only one of the thousands of people who have starred this project, but I would greatly benefit from a list of the purposes of each pattern in the README document. It would keep me/us/others from having to peruse each individual module to determine their use when there are so many other interesting things that that equally demand attention.

Thoughts?

Activity

  1. faif commented on May 3, 2014

    @faif
    Owner

    I find this a good idea. Are you willing to update the README?

  2. dsoprea commented on May 3, 2014

    @dsoprea
    ContributorAuthor

    If you'd be will to discuss the patterns that I'm not familiar with.
    On May 3, 2014 7:06 PM, "Sakis Kasampalis" notifications@github.com
    wrote:

    I find this a good idea. Are you willing to update the README?

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-42118837
    .

  3. dsoprea commented on May 5, 2014

    @dsoprea
    ContributorAuthor

    Go to town. I noted a couple of patterns that either weren't patterns (graph-search), or were somewhat obsolete (null) in modern Python. Feel free to either disagree, or remove them.

  4. faif commented on May 5, 2014

    @faif
    Owner

    You are right about graph search, it was checked in by a contributor and I decided to keep it not because it's a pattern but as an idiom that demonstrates how you can work with graphs in python. As for null, I'm not sure about how useful it is. Can you give references about what makes it obsolete in Python?

  5. dsoprea commented on May 5, 2014

    @dsoprea
    ContributorAuthor

    Maybe you could create a new directory called "algorithms", or project
    called "python-algorithms". That way it doesn't pollute the patterns.

    GvR considered it unpythonic to either not check the value, or just catch
    the exception. The latter of which is usually preferred.

    http://legacy.python.org/dev/peps/pep-0336/
    http://legacy.python.org/dev/peps/pep-0336/

    Abstract
    None should be a callable object that when called with any
    arguments has no side effect and returns None.

    BDFL Pronouncement
    This PEP is rejected. It is considered a feature that None raises
    an error when called. The proposal falls short in tests for
    obviousness, clarity, explictness, and necessity. The provided Switch
    example is nice but easily handled by a simple lambda definition.
    See python-dev discussion on 17 June 2005.

    Since Python developers are usually encouraged to rely on exceptions rather
    than ever returning None (thus reducing the existence of None/NULLs
    compared to other languages), this kind of check should be rare.

    On Mon, May 5, 2014 at 9:03 AM, Sakis Kasampalis
    notifications@github.comwrote:

    You are right about graph search, it was checked in by a contributor and I
    decided to keep it not because it's a pattern but as an idiom that
    demonstrates how you can work with graphs in python. As for null, I'm not
    sure about how useful it is. Can you give references about what makes it
    obsolete in Python?

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-42185075
    .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions