[issue15476] Index "code object" and link to code object definition

2016-06-09 Thread Martin Panter

Martin Panter added the comment:

Thanks for the patch Tommy. I think we can close this now.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2e9aace7e10a by Tommy Beadle in branch '3.5':
[Issue 15476] Make "code object" its own entry in the index
https://hg.python.org/cpython/rev/2e9aace7e10a

New changeset 8455bbc6b4f2 by Martin Panter in branch 'default':
Issue #15476: Merge index entries from 3.5
https://hg.python.org/cpython/rev/8455bbc6b4f2

New changeset f89e96235a42 by Tommy Beadle in branch '2.7':
[Issue 15476] Make "code object" its own entry in the index
https://hg.python.org/cpython/rev/f89e96235a42

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-07 Thread Martin Panter

Martin Panter added the comment:

Yes it seems you even fixed the problem with the definition list, which I 
thought was not fixable :)

--
stage: needs patch -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-07 Thread Tommy Beadle

Tommy Beadle added the comment:

Martin, thanks for the suggestion that worked.  I believe this patch should 
have all of the issues addressed.

--
Added file: 
http://bugs.python.org/file43298/0001-Issue-15476-Make-code-object-its-own-entry-in-the-do.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-03 Thread Martin Panter

Martin Panter added the comment:

Not sure why it doesn’t come up in the code review, but in

diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index c0b4930..f34ba9f 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -847,8 +847,10 @@ Internal types

Code objects
+
   .. index::
  single: bytecode
+ single: code object
  object: code
 
   Code objects represent *byte-compiled* executable Python code, or 
:term:`bytecode`.

that added blank line seems to also cause the same definition list problem as 
before :(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-03 Thread Martin Panter

Martin Panter added the comment:

I haven’t tested, but maybe this will do what you want:

.. index:: object; code, code object

or

.. index::
   single: object; code
   single: code object

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-03 Thread Tommy Beadle

Tommy Beadle added the comment:

Using

.. index::
   object: code

puts a 'code' entry under 'object' as well as 'object' under 'code'.  That's 
the way it is for every other item that uses "object: XXX".  So if you want a 
new 'code object' top-level item and keep 'object -> code', you're going to get 
'code -> object' as well.  It would seem to me that the 'code object' top-level 
item is redundant.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-03 Thread R. David Murray

R. David Murray added the comment:

There are entries for code with object as a subentry?  That's not what I was 
talking about, I was talking about preserving the sub entries for 'code' under 
the 'object' main entry.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-03 Thread Tommy Beadle

Changes by Tommy Beadle :


Added file: 
http://bugs.python.org/file43152/0001-Issue-15476-Make-code-object-its-own-entry-in-the-do.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-03 Thread Martin Panter

Martin Panter added the comment:

I left some minor review suggestions. But a more serious problem is that the 
change to Doc/reference/datamodel.rst breaks the formatting for me. Instead of 
a HTML , I get a  followed by a . Unfortunately I don’t know 
of a way to get index entries to point to the definition list heading without 
breaking up a definition list like this.

IMO having entries under both “code object” and “code” is redundant, but I see 
that is debatable. :) If I was looking this up, I would probably look at “code” 
first. If it wasn’t there, I might even miss a separate “code object” entry, 
considering there is also a second “code (. . .)” entry as well.

--
nosy: +martin.panter
versions: +Python 2.7, Python 3.5, Python 3.6 -Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-02 Thread Tommy Beadle

Tommy Beadle added the comment:

This restores the original code -> object items.

--
Added file: 
http://bugs.python.org/file43137/0001-Issue-15476-Make-code-object-its-own-entry-in-the-do.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-02 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-02 Thread R. David Murray

R. David Murray added the comment:

Since the main object of the issue is to have a canonical reference to use for 
linking 'code object' from elsewhere in the text, I think that can be satisfied 
by existing _bltin-code-objects 'ref' link as Terry suggests, even though it is 
a bit awkward to use.  The changes to the index position are good, I think, as 
is having a direct index entry for 'code object'.  However, following the model 
laid down by 'class object', the existing index entries under object should not 
be lost, but instead the new 'code object' index links should be added.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index "code object" and link to code object definition

2016-06-02 Thread Tommy Beadle

Tommy Beadle added the comment:

The attached patch makes it so that 'code object' is its own 'top-level' entry 
in the index instead of being 'code' with an 'object' sub-item.  It also makes 
the links from the index go to the location in the documents just before the 
header instead of having the header be off-screen when the user navigates to it.

One thing about the ordering of the generated links, though, is that sphinx 
appears to generate them based on the alphabetical ordering of the path to the 
files that they're in:

c-api/code.rst
library/marshal.rst
library/stdtypes.rst
reference/datamodel.rst

If the order is that important, I believe it would require us to create 
sub-items that could look like this:

code object
C API
built-in type
type reference
marshaling

It didn't seem like other indexed entries follow this breakout pattern, but if 
that's what's desired for this case, just let me know and I'll submit a 
different patch.

--
keywords: +patch
nosy: +tbeadle
Added file: 
http://bugs.python.org/file43126/0001-Issue-15476-Make-code-object-its-own-entry-in-the-do.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15476] Index code object and link to code object definition

2014-06-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There is no entry for 'code object' (unlike, for instance 'class object'). 
There is an entry for 'code' and a subentry for 'object' with four links.

The fourth link is to the short definition in the library manual:
https://docs.python.org/3/library/stdtypes.html#index-46
https://docs.python.org/3/library/stdtypes.html#code-objects
is better as it includes the header line. This is the one that should be used 
elsewhere.

The entry says See The standard type hierarchy for more information.

The third link is to the long definition in the datamodel section.
https://docs.python.org/3/reference/datamodel.html#index-53
Again, the header line is cut off. I presume this is because the index 
directive is after rather than before the header line. I think the short 
definition should point directly here.

The second link is to code objects in the C-API
https://docs.python.org/3/c-api/code.html#index-0

The first link is to marshal, because marshal marshals code objects. 

In other words, the unlabeled links are in the reverse order of what one would 
want. More helpful would be something like

code object
  C-API
  definition
  marshal

--
title: Add code object to glossary - Index code object and link to code 
object definition

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15476
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com