[issue7771] dict view comparison methods are not documented

2010-10-15 Thread Georg Brandl

Georg Brandl  added the comment:

Applied in r85532. Thanks!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-10-09 Thread Sandro Tosi

Sandro Tosi  added the comment:

gaah, sorry about that. I've prepared another patch that removes the '^' part 
and adds an example about that.

About the reference to Collections.Set to be a link to the Collections page, do 
you think it's acceptable to define all the Collection ABCs as :class:`...` ? I 
looked at http://docs.python.org/documenting/markup.html but didn't find a 
specific markup for ABC, so I suppose 'class' is fine.

If you think it might worth the effort, I can mark those ABCs up as class, and 
scan the documentation for references to them and convert to link (if not 
already done automagically).

--
Added file: http://bugs.python.org/file19169/issue7771-py3k-v3.patch

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-10-08 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The '^' corresponds to the __xor__ magic method.

snip from _abcoll.py:

def __xor__(self, other):
if not isinstance(other, Set):
if not isinstance(other, Iterable):
return NotImplemented
other = self._from_iterable(other)
return (self - other) | (other - self)

--

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-10-08 Thread Sandro Tosi

Sandro Tosi  added the comment:

Hello Raymond,
thanks for the review. I've reworked the patch to refer to Collections.Set (but 
is there a way to make that reference a link to the description of Collections 
ABCs?) and so I've also removed all the examples, leaving only the one for '^' 
because I didn't see a Set operator to do that (but I'm happy to be proven 
wrong :)

Regards,
Sandro

--
Added file: http://bugs.python.org/file19166/issue7771-py3k-v2.patch

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-10-08 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

We should probably just make reference to the collections.Set() abstract API 
instead of listing out all operations.

--
nosy: +rhettinger

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-10-08 Thread Sandro Tosi

Sandro Tosi  added the comment:

Hello,
here attached a patch for this bug. I hope the format "< / <= / == / != / >= / 
>" is clearly understandable as an alternative sequence of different operations.

Regards,
Sandro

--
keywords: +patch
nosy: +sandro.tosi
Added file: http://bugs.python.org/file19165/issue7771-py3k.patch

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-01-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The 3.2a doc is unchanged (similarly lacking).

The situation is that view have all of the special method (operator methods) 
that frozen sets do but none of the named methods (.copy to .union). I think it 
would be helpful if the doc said so. Perhaps change

"Then these set operations are available ..."

to

"For set-like view, all of the syntax operations on sets (but none of the named 
methods, like set.copy,) are available ..."

I think

dictview < / <= / >= / > other:
 same as corresponding operation with two sets

might be sufficient, but list all four is ok too.

--
nosy: +tjreedy

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-01-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
priority:  -> normal
stage:  -> needs patch

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-01-24 Thread Jan Kaliszewski

New submission from Jan Kaliszewski :

Dictionary views documentation (e.g. 
http://docs.python.org/3.1/library/stdtypes.html#dictionary-view-objects) 
contains nothing about comparison (> >= < <= == !=) operations.

--
assignee: georg.brandl
components: Documentation
messages: 98240
nosy: georg.brandl, zuo
severity: normal
status: open
title: dict view comparison methods are not documented
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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