Tim Golden added the comment:
Jaivish Kothari,
Thanks for making the effort to contribute. Can I suggest you have a
look at the Core Mentorship site:
http://pythonmentors.com/
and perhaps join the Core Mentorship list:
http://mail.python.org/mailman/listinfo/core-mentorship
TJG
Jaivish Kothari added the comment:
Thank you Tim.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24005
___
___
Python-bugs-list mailing list
Jaivish Kothari added the comment:
Thanks for support . I agree it is not a bug at all but just as Tim said it
would be easy to copy paste code directly to interpreter with such changes.
This was my first contribution in python though not accepted , it is ok :) .
I'll try to contribute more
Jaivish Kothari added the comment:
Please find the attached patch for review.
--
keywords: +patch
resolution: - fixed
Added file: http://bugs.python.org/file39118/doc_patch.patch
___
Python tracker rep...@bugs.python.org
New submission from Jaivish Kothari:
https://docs.python.org/2/whatsnew/2.4.html?highlight=decorators#pep-318-decorators-for-functions-and-methods
'''
def require_int (func):
def wrapper (arg):
assert isinstance(arg, int)
return func(arg)
return wrapper
'''
New line is
Georg Brandl added the comment:
Why is this a bug?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24005
___
___
Python-bugs-list mailing list
Berker Peksag added the comment:
That document is 10 years old :) I don't think it's worth to change now. Also,
what's new documents shouldn't be used as a tutorial. There are many
tutorials about writing decorators on the internet.
(Thanks for the report and the patch, Jaivish)
--
Carol Willing added the comment:
janonymous, Thanks for the contribution. I agree with George that this is not a
bug. The whitespace exists for developer readability and maintainability of
code. Here's a section from PEP8 about the use of whitespace
Tim Golden added the comment:
One small thing to bear in mind is that the existing code (ie with the extra
linefeed) raises an IndentationError if cut-and-pasted into the interactive
interpreter; with the OP's change, it succeeds. Might not have been their
intention, but certainly is the
Carol Willing added the comment:
Tim, A good point re: the interpreter. I've attached an output from IPython
interpreter.
Georg, Given Tim's additional insight, I'm inclined to reopen the issue and
review the patch as a positive change. Though not a bug, but as an enhancement
for learners to
Georg Brandl added the comment:
Yeah, agreed.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24005
___
___
Python-bugs-list mailing list
Tim Golden added the comment:
(Laughs). I admit, I was so close to the trees, I missed the fact that
the doc is, as you say, a What's New, and for Python 2.4. Agree that to
change this now would be somewhat ludicrous.
If some similar patch were proposed to some more current, relevant
12 matches
Mail list logo