Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue15527] Double parens in functions references

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Aug 1, 2012, 8:41 AM

Post #1 of 21 (452 views)
Permalink
[issue15527] Double parens in functions references

Changes by Antoine Pitrou <pitrou [at] free>:


----------
title: Double parents in functions references -> Double parens in functions references

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2012, 6:14 AM

Post #2 of 21 (443 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Changes by Andrew Svetlov <andrew.svetlov [at] gmail>:


----------
nosy: +asvetlov

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2012, 11:35 AM

Post #3 of 21 (441 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Andrew Svetlov added the comment:

Fixed.
Sorry, I forgot to mention issue number in commit messages.
So it's 9c99f31a9c2a 96cc3ab243e5 and 1e8f6d8e5c0e commits.
Thanks for report.

----------
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2012, 11:51 AM

Post #4 of 21 (442 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Georg Brandl added the comment:

These commit hashes don't seem to match this issue.

----------
nosy: +georg.brandl

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2012, 11:56 AM

Post #5 of 21 (442 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Andrew Svetlov added the comment:

Sorry, Georg. A'm apologizing.
Actual commit numbers are: 6dab233a115e a979b005a814 4787b9b2f860

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2012, 12:02 PM

Post #6 of 21 (446 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Georg Brandl added the comment:

Thanks!

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2012, 12:05 PM

Post #7 of 21 (443 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Andrew Svetlov added the comment:

Thank you for reviewing every minor update.
It's a big deal and heavy work!

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2012, 12:34 PM

Post #8 of 21 (443 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Serhiy Storchaka added the comment:

Hmm, I'm hoping that will be fixed by fixing of some markup words (:c:func:, :func:, :meth:, etc) processing, and not that they will simply be removed. :c:func: works only for function name without parameters or for function name with empty list of parameters inside the parentheses (:c:func:`PyMem_Malloc`, :c:func:`PyMem_Malloc()`, but not :c:func:`PyMem_Malloc(1)`). :c:macro: works also for non-empty list (:c:macro:`Py_CLEAR(obj)` for example).

And Doc/c-api/memory.rst is not only one issue file. The list of suspicious places you can get by the followed command:

find Doc/ -type f -name '*.rst' -exec egrep -n --color ':`\w+[(][^)]' '{}' +

----------
resolution: fixed ->
stage: committed/rejected -> needs patch
status: closed -> open

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2012, 12:42 PM

Post #9 of 21 (442 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Georg Brandl added the comment:

The markup you mentioned will not be changed: these are two different usecases. Either you link to the function itself (:func:`blah`), or you show a piece of code (``blah(n)``).

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2012, 12:52 PM

Post #10 of 21 (445 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Andrew Svetlov added the comment:

>From my perspective sphinx doesn't allow notations like :c:func:`PyMem_Malloc(1)`
Do you want to publish bugfix for sphinx? Sounds like good idea, but that fix is out my current competence.
I just fixed weird stuff which you pointed out.
If you want to do more — you are welcome. Please push a patch.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 10, 2012, 11:18 AM

Post #11 of 21 (442 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Serhiy Storchaka added the comment:

Sorry, I don't know anything about the Sphinx, therefore, I do not know what is the problem and what the solution should be.

1) If this is the improper use of markup (the arguments are not supported and must not), we need to remove markup from other doc files (Doc/library/os.rst, Doc/library/platform.rst, Doc/library/unittest.rst, Doc/whatsnew/2.0.rst, Doc/whatsnew/2.1.rst, Doc/whatsnew/2.2.rst, Doc/whatsnew/2.3.rst, Doc/whatsnew/2.4.rst, Doc/whatsnew/2.5.rst, Doc/whatsnew/3.0.rst).

2) If the behaviour of the markup is controlled by configuration files, which are under the management of the CPython team, then these configuration files should be fixed.

3) If the behaviour of the markup is hardcoded inside the Sphinx, then it is the Sphinx bug and it should be reported to Sphinx team. I don't know what CPython team can/should do with it.

Which of these variants is actual?

Note, :c:macro: works for names with arguments, and :c:func:, :func:, :meth: did not.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 10, 2012, 11:22 AM

Post #12 of 21 (441 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Georg Brandl added the comment:

1) is correct.

(And cmacro works because it's only for non-function macros anyway.)

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 10, 2012, 12:40 PM

Post #13 of 21 (440 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Chris Jerdonek added the comment:

- a distinct non-*NULL* pointer if possible, as if :c:func:`PyMem_Malloc(1)` had
+ a distinct non-*NULL* pointer if possible, as if ``PyMem_Malloc(1)`` had

> From my perspective sphinx doesn't allow notations like :c:func:`PyMem_Malloc(1)`

I believe that it does. Sphinx allows you to specify link text distinct from the target for various roles:

http://docs.python.org/devguide/documenting.html#id3

So for the above, it would be--

:c:func:`PyMem_Malloc(1) <PyMem_Malloc>`

I confirmed that this works. I think this is preferable to displaying the preferred text without any hyperlink.

----------
nosy: +cjerdonek

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 10, 2012, 2:05 PM

Post #14 of 21 (441 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Serhiy Storchaka added the comment:

Thanks Chris. Here's the patch.

----------
stage: needs patch -> patch review

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 10, 2012, 2:06 PM

Post #15 of 21 (441 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Changes by Serhiy Storchaka <storchaka [at] gmail>:


----------
keywords: +patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 10, 2012, 2:07 PM

Post #16 of 21 (440 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Changes by Serhiy Storchaka <storchaka [at] gmail>:


Added file: http://bugs.python.org/file26760/doc_dbl_parens.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 10, 2012, 11:32 PM

Post #17 of 21 (441 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Georg Brandl added the comment:

Is anyone even reading my messages...?

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 11, 2012, 12:54 AM

Post #18 of 21 (441 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Serhiy Storchaka added the comment:

Georg, I see that :meth: with arguments works in the form :meth:`name(args) <module.class.name>`. I believe that the hyperlinks are helpful and it was designed that way.

Replacing :meth:/:func:/:c:func: for names with arguments on double backquotes can be done almost automatically. Here's another patch (I like it less).

----------
Added file: http://bugs.python.org/file26763/doc_dbl_parens_drop_markup.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 11, 2012, 11:15 AM

Post #19 of 21 (441 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Roundup Robot added the comment:

New changeset 5e025dc7d728 by Andrew Svetlov in branch 'default':
Issue #15527: fix docs, remove double parens by changing markup.
http://hg.python.org/cpython/rev/5e025dc7d728

----------
nosy: +python-dev

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 11, 2012, 11:18 AM

Post #20 of 21 (441 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Andrew Svetlov added the comment:

Applied patch uses ``expr(n)`` as Georg prefer.

Serhiy, please close the issue if you have not any upcoming patches.
Thanks.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 11, 2012, 11:28 AM

Post #21 of 21 (441 views)
Permalink
[issue15527] Double parens in functions references [In reply to]

Serhiy Storchaka added the comment:

Thank you Andrew.

----------
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.