[ python-Bugs-1429063 ] set documentation deficiencies

2006-02-10 Thread SourceForge.net
Bugs item #1429063, was opened at 2006-02-10 12:26
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429063&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Keith Briggs (kbriggs)
Assigned to: Nobody/Anonymous (nobody)
Summary: set documentation deficiencies

Initial Comment:
http://www.python.org/doc/current/lib/types-set.html
has a dead link: "Module sets".

Also, there does not seem to be any documentation on
how to construct a set.   Does set()==set([])?   What
is allowed  as an argument to set()?  Any iterable?

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429063&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1429053 ] set documentation deficiencies

2006-02-10 Thread SourceForge.net
Bugs item #1429053, was opened at 2006-02-10 12:07
Message generated for change (Comment added) made by kbriggs
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429053&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Keith Briggs (kbriggs)
Assigned to: Nobody/Anonymous (nobody)
Summary: set documentation deficiencies

Initial Comment:
http://www.python.org/doc/current/lib/types-set.html
has a dead link: "Module sets".

Also, there does not seem to be any documentation on
how to construct a set.   Does set()==set([])?   What
is allowed  as an argument to set()?  Any iterable?

--

>Comment By: Keith Briggs (kbriggs)
Date: 2006-02-10 15:53

Message:
Logged In: YES 
user_id=888261

Furthermore, the operations update etc. are mutations of s,
so wouldn't the definitions

s.update(t) s |= t  return set s with elements added from t
s.intersection_update(t)s &= t  return set s keeping only
elements also found in t
s.difference_update(t)  s -= t  return set s after removing
elements found in t
s.symmetric_difference_update(t)s ^= t  return set s with
elements from s or t but not both

be better as 

s.update(t) s |= t  add elements from t to s

etc.?
I'm not sure what the word "return" is doing here.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429053&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1429063 ] set documentation deficiencies

2006-02-10 Thread SourceForge.net
Bugs item #1429063, was opened at 2006-02-10 13:26
Message generated for change (Settings changed) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429063&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
>Status: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: Keith Briggs (kbriggs)
Assigned to: Nobody/Anonymous (nobody)
Summary: set documentation deficiencies

Initial Comment:
http://www.python.org/doc/current/lib/types-set.html
has a dead link: "Module sets".

Also, there does not seem to be any documentation on
how to construct a set.   Does set()==set([])?   What
is allowed  as an argument to set()?  Any iterable?

--

>Comment By: Georg Brandl (birkenfeld)
Date: 2006-02-10 17:20

Message:
Logged In: YES 
user_id=1188172

Duplicate of #1429053.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429063&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1429053 ] set documentation deficiencies

2006-02-10 Thread SourceForge.net
Bugs item #1429053, was opened at 2006-02-10 13:07
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429053&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Keith Briggs (kbriggs)
Assigned to: Nobody/Anonymous (nobody)
Summary: set documentation deficiencies

Initial Comment:
http://www.python.org/doc/current/lib/types-set.html
has a dead link: "Module sets".

Also, there does not seem to be any documentation on
how to construct a set.   Does set()==set([])?   What
is allowed  as an argument to set()?  Any iterable?

--

>Comment By: Georg Brandl (birkenfeld)
Date: 2006-02-10 17:21

Message:
Logged In: YES 
user_id=1188172

This is all already corrected, except for the empty set thing.

--

Comment By: Keith Briggs (kbriggs)
Date: 2006-02-10 16:53

Message:
Logged In: YES 
user_id=888261

Furthermore, the operations update etc. are mutations of s,
so wouldn't the definitions

s.update(t) s |= t  return set s with elements added from t
s.intersection_update(t)s &= t  return set s keeping only
elements also found in t
s.difference_update(t)  s -= t  return set s after removing
elements found in t
s.symmetric_difference_update(t)s ^= t  return set s with
elements from s or t but not both

be better as 

s.update(t) s |= t  add elements from t to s

etc.?
I'm not sure what the word "return" is doing here.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429053&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1429481 ] For loop exit early

2006-02-10 Thread SourceForge.net
Bugs item #1429481, was opened at 2006-02-10 19:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429481&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: msmith (mike_smith)
Assigned to: Nobody/Anonymous (nobody)
Summary: For loop exit early

Initial Comment:
When I run the following snippet the "for" loop exits
early, not examining every item in the "lines" list. 
It will only print part of the list, i.e., only
approximately 65% of any list I use is printed.  (E.g.,
a list of 100 items only about 65 is printed)

If I wrap the for statement in another for statement
with a range() operator it works.

I'm pretty new to scripting, so I'm sure there's a
better way to do what I'm trying; but this seems like a
 bug.

Thanks for your help,

=

count = 0
lines =
["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"]
def getnextline():
l = lines.pop()
l = l.strip()
return l
for x in lines:
count += 1
newline = "%s,%s,\n" % (getnextline(),getnextline())
print count, ":", newline   

Output:
-
1 : 16,15,

2 : 14,13,

3 : 12,11,

4 : 10,9,

5 : 8,7,

6 : 6,5,

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429481&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1429481 ] For loop exit early

2006-02-10 Thread SourceForge.net
Bugs item #1429481, was opened at 2006-02-10 19:13
Message generated for change (Comment added) made by tim_one
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429481&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
>Group: Not a Bug
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: msmith (mike_smith)
Assigned to: Nobody/Anonymous (nobody)
Summary: For loop exit early

Initial Comment:
When I run the following snippet the "for" loop exits
early, not examining every item in the "lines" list. 
It will only print part of the list, i.e., only
approximately 65% of any list I use is printed.  (E.g.,
a list of 100 items only about 65 is printed)

If I wrap the for statement in another for statement
with a range() operator it works.

I'm pretty new to scripting, so I'm sure there's a
better way to do what I'm trying; but this seems like a
 bug.

Thanks for your help,

=

count = 0
lines =
["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"]
def getnextline():
l = lines.pop()
l = l.strip()
return l
for x in lines:
count += 1
newline = "%s,%s,\n" % (getnextline(),getnextline())
print count, ":", newline   

Output:
-
1 : 16,15,

2 : 14,13,

3 : 12,11,

4 : 10,9,

5 : 8,7,

6 : 6,5,

--

>Comment By: Tim Peters (tim_one)
Date: 2006-02-10 23:34

Message:
Logged In: YES 
user_id=31435

Changed "group" to not-a-bug.

--

Comment By: Raymond Hettinger (rhettinger)
Date: 2006-02-10 19:25

Message:
Logged In: YES 
user_id=80475

Sorry, the bug is in your code (the for-loop is looping 
over a list that is being mutated by pops).  I recommend 
posting on comp.lang.python or to the python-tutor list to 
get feedback on how to write this correctly.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1429481&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com