Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dsoprea opened this issue Apr 27, 2014 · 5 comments · Fixed by #55
Closed

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

dsoprea opened this issue Apr 27, 2014 · 5 comments · Fixed by #55

Comments

@dsoprea
Copy link
Contributor

dsoprea commented Apr 27, 2014

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?

@faif
Copy link
Owner

faif commented May 3, 2014

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

@dsoprea
Copy link
Contributor Author

dsoprea commented May 3, 2014

If you'd be will to discuss the patterns that I'm not familiar with.
On May 3, 2014 7:06 PM, "Sakis Kasampalis" [email protected]
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
.

@dsoprea
Copy link
Contributor Author

dsoprea commented May 5, 2014

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.

@faif faif closed this as completed in #55 May 5, 2014
@faif
Copy link
Owner

faif commented May 5, 2014

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?

@dsoprea
Copy link
Contributor Author

dsoprea commented May 5, 2014

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
[email protected]:

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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants