[issue14911] generator.throw() documentation inaccurate

2018-10-17 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

It seems that this patch was close to being merged.  Would it be helpful for me 
to create a PR for it over 3.8?  Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue14911] generator.throw() documentation inaccurate

2015-12-18 Thread Martin Panter

Martin Panter added the comment:

This one is based on the public 3.5 branch, so should work. I corrected a small 
typo made in the previous patch.

--
versions:  -Python 3.4
Added file: http://bugs.python.org/file41360/throw-3x.v3.patch

___
Python tracker 

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



[issue14911] generator.throw() documentation inaccurate

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Martin, could you please rebase your patch on top of recent cpython default 
branch, so that a 'review' link appears?

--

___
Python tracker 

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



[issue14911] generator.throw() documentation inaccurate

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

Changes in throw-3x.v2.patch:

* Split into two signatures
* Added parallel coroutine.throw(value) signature
* *Value* should be an exception instance; drop mentioning other options
* Default value is instantiated from *type*
* __traceback__ can be cleared
* Dropped the example
* Update generator and coroutine doc strings with double signatures

--
Added file: http://bugs.python.org/file41245/throw-3x.v2.patch

___
Python tracker 

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



[issue14911] generator.throw() documentation inaccurate

2015-11-17 Thread Martin Panter

Martin Panter added the comment:

I can’t really comment on the 2.7 version, because I’m not too familiar with 
Python 2 exceptions.

For Python 3, is there any reason to bless the None, tuple or non-exception 
cases as the exception “value” argument? IMO these just make things too 
complicated without any benefit. Changes I would make to the patch:

* Only mention that “value” can be omitted, or it can be an instance of the 
class specified by “type”. Drop mentioning the None option, and the single or 
tuple constructor argument options. It looks like the tuple option actually 
gets expanded to multiple constructor arguments?!
* Mention that if “value” is passed, its traceback could be lost
* Drop the example, unless someone can come up with a concise and realistic 
example
* Unify with definition for coroutines 

* Change the doc string(s) to match the argument names, but don’t bother 
copying the full definition text

--
stage: needs patch -> patch review

___
Python tracker 

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



[issue14911] generator.throw() documentation inaccurate

2015-06-20 Thread Martin Panter

Martin Panter added the comment:

See Issue 13213 for some analysis of the behaviour of different combinations of 
arguments.

The docstring should be changed if necessary, but in this case I don’t see what 
needs changing. The argument names perhaps, just for consistency’s sake?

--
nosy: +vadmium
versions: +Python 3.4, Python 3.5, Python 3.6 -Python 3.2, Python 3.3

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



[issue14911] generator.throw() documentation inaccurate

2014-02-04 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Note that the docstring does not match the doc:
PyDoc_STRVAR(throw_doc,
throw(typ[,val[,tb]]) - raise exception in generator,\n\
return next yielded value or raise StopIteration.);

Should I change the docstring too?

--

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



[issue14911] generator.throw() documentation inaccurate

2014-02-03 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Here's one for 2.7.  I'm still looking at 3.  The funny thing is that the 
signature of generator.throw reflects 2.x conventions.  I'm figuring out if it 
can be used with the .with_traceback() idiom

--
keywords: +patch
Added file: http://bugs.python.org/file33886/throw27.diff

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



[issue14911] generator.throw() documentation inaccurate

2014-02-03 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

And 3.x

--
Added file: http://bugs.python.org/file33888/3x.diff

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



[issue14911] generator.throw() documentation inaccurate

2014-02-03 Thread Yury Selivanov

Yury Selivanov added the comment:

I like the patches, except the example in 3x.diff. Please see the review.

--

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



[issue14911] generator.throw() documentation inaccurate

2014-01-31 Thread Yury Selivanov

Yury Selivanov added the comment:

Kristjan, can you write a patch for this?

--
nosy: +yselivanov

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



[issue14911] generator.throw() documentation inaccurate

2012-05-25 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson krist...@ccpgames.com:

the documentation for generator.throw() does not mention the fact that it has 
the same semantics for the three arguments as a raise expression has.
The first two arguments can be:
throw(exc_type, None)
throw(exc_type, value)
throw(exc_type, exc_instance)
throw(exc_instance, None)

--
assignee: docs@python
components: Documentation
messages: 161565
nosy: docs@python, kristjan.jonsson
priority: normal
severity: normal
status: open
title: generator.throw() documentation inaccurate
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

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



[issue14911] generator.throw() documentation inaccurate

2012-05-25 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
stage:  - needs patch
versions:  -Python 3.1, Python 3.4

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