kushaldas / pym Goto Github PK
View Code? Open in Web Editor NEWPython for you and me book
Python for you and me book
In this piece of code,
https://github.com/kushaldas/pym/blob/master/docs/operatorsexpressions.rst#evaluateequpy
print "%2d %6.4f" % (i , sum)
should be indented. it should come inside the for loop.
fix this.
Thanks.
In Installation chapter, under On GNU/Linux point, there is a usage of word bellow
:
Install the latest Python from the distribution’s repository.
For Fedora 23 and above Python3 is in the system by default.
For Fedora 22 and bellow.
The correct word is below.
There is a spelling error in the generator chapter of the book.
One way to create a reusable generator is Object-based generators which does not hold any state. Any class with an iter method which yields data can be used as an object generator. In the following example, we will recreate our counter generator.
Put this edited paragraph instead, the old paragraph was this:
One way to create a reusable generator is Object based generators which does not hold any state. Any class with a iter method which yields data can be used as a object generator. In the following example we will recreate out counter generator.
With article mistakes and punctuations and spelling errors.
I am referring to http://pymbook.readthedocs.io/en/latest/operatorsexpressions.html#shorthand-operator. x op= y is not always equivalent to x = x op y. The statement is always true for immutable objects like ints and tuples. Mutable objects, on the other hand, can have a completely different implementation of the shorthand operators since those operators can modify the object in-place. For example, lists define a legitimately different __iadd__
operator (which is basically extend
).
pym/docs/igd.rst
for x in range(1,10) is 1-9, not 1-99
This is a great resource I have found. But through out the book, or the repo,
PS : If I were to choose a license of the book, I would choose CC- Public Domain. So that people who are further using/re-using the book are not constrained in any manner of permissions.
http://pymbook.readthedocs.org/en/latest/looping.html
In the power series section it is given x = float(raw_input("Enter the value of x: "))
it should be x = float(input("Enter the value of x: ")) for python3
Your PEP 8 part at http://pymbook.readthedocs.io/en/latest/pep8.html is rather bad. It differs from the actual current PEP 8 and you make it look misleadingly official. Better use the actual current PEP 8 text, add a clear header saying that this is only a copy, and link to the original. Though I really don't get the point of copying it in the first place. I think it would be best for you to only summarize PEP 8, briefly explaining what it is, giving a few important examples, and then referring to the original document on the Python site for people interested in the whole thing.
I btw came across your page as the fifth result in a google search for "pep8" (and I see your GitHub repository is quite popular). So it's not insignificant. It might actually be misleading people already.
It will be great to add a chapter of handling SQL Operation in the book. We can discuss about the topic like how to execute SQL CRUD Operations and use of ORM library like SQLAlchemy.
We need to fix the operators table in the operators chapter.
In Operators ,
>>> 22.0 / 12 1.8333333333333333
To get floating result you need to the division using any of operand as floating number.
The above line is not valid for Python 3 as we don't require the operand as floating number to get a floating result. So this line should be modified.
>>> 22 / 12 1.8333333333333333
In the same article we should also add some example about floor division for python.
[x] Bug (Typo)
wtih
, however expect to see with
.terinal
, however expect to see terminal
.interpeter
, however expect to see interpreter
.happend
, however expect to see happened
.drivative
, however expect to see derivative
.comamnd
, however expect to see command
.classs
, however expect to see class
.accross
, however expect to see across
.Semi-automated issue generated by
https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md
To avoid wasting CI processing resources a branch with the fix has been
prepared but a pull request has not yet been created. A pull request fixing
the issue can be prepared from the link below, feel free to create it or
request @timgates42 create the PR. Alternatively if the fix is undesired please
close the issue with a small comment about the reasoning.
https://github.com/timgates42/pym/pull/new/bugfix_typos
Thanks.
In functions chapter in first paragraph last line there is usage of word build in:
Reusing the same code is required many times within a same program. Functions help us to do so. We write the things we have to do repeatedly in a function then call it where ever required. We already saw build in functions like len(), divmod().
the correct word is not build in, rather its built-in
In https://pymbook.readthedocs.io/en/latest/thebeginning.html change
... a = 12 + 34
print(c) #this is a comment too :)
into
print(a) #this is a comment too :)
I think matrix multiplication example in https://github.com/kushaldas/pym/blob/master/docs/datastructure.rst is wrong, should be like this:
c = []
for i in range(0, n):
c.append([])
for j in range(0, n):
c[i].append(sum([a[i][k] * b[k][j] for k in range(0, n)]))
Start Python 3 ! by Seyed Hossein Ahmadpanah is a ripoff of your book and is sold on Amazon (https://www.amazon.com/Start-Python-Seyed-Hossein-Ahmadpanah/dp/1511625554/ref=asap_bc?ie=UTF8). The guy has been confirmed as plagiarising 8 books at least and we have managed to get some taken down by complaining to Amazon. Good luck and keep me informed, please (jan @ newmarch.name)
Thanks for the wonderful work that you and the community has done. I think it would be a nice idea to have an explicit license so the terms of usage, editing and redistribution are clear.
In Data Structures chapter, List section and in demo of remove function a.remove
that block has visible rst
::
Two typos in function chapter default argument section:
In a function variables may have default argument values, that means if we don’t give any value for that particular variable it will assigned automatically.
there should be be after it will
and in the second paragraph:
In the above example we have written b = -99 in the function parameter list. That means of no value for b is given then b’s value is -99.
typing mistake there is of instead of if
pym/docs/datastructure.rst
iteritems() method is deprecated in python3
Replace all instances with items() instead.
The sentence at the top of the homepage that points the user to the Python 2.x version of the book appears to be incorrect. It points to this 3.x homepage rather than a homepage for the 2.x version of the book.
It is difficult to find the download link on the book's home page.
The bottom right link with green color letters (v:latest) does not mean for downloading.
Give the links for PD. epub on the left panel itself.
under section "Useful Links"
Thanks.
You need to change the raw_input() to input() as in Python3.x raw_input() is not anymore supported.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.