GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Avoid creating a StopIteration instance for monitoring · Issue #118692 · python/cpython Closed Labels 3.13only security fixesonly security fixestype-featureA feature request or enhancementA feature request or enhancement DescriptionFeature or enhancementProposal:A new C-API for injecting monitoring events was discussed in #111997 and implemented for Py3.13 in #116413 A remaining issue is that signalling "STOP_ITERATION" events requires a I think it would be best if CPython's monitoring infrastructure created a StopIteration instance automatically when it detects that it needs to notify about it without having one. It's in the best position to detect whether it really needs an exception instance or not. Event sources shouldn't be forced to a) figure that out themselves or b) create an instance just for it to be thrown away. CPython already creates an exception instance for submitting a monitoring event for a generator, but does so unconditionally. It would also benefit from not having to generate one unless it's really needed for signalling. Lines 289 to 317 in 5248596
Basically, we should move the existing code from the byte code handlers all the way to the other side into the notification mechanism. In order to report the correct StopIteration value, the event creation function should accept an object value directly, and create a We might allow passing the value This ticket proposes a usability/performance enhancement to a newly added feature in Py3.13, and thus does not fall under the "beta-1" release end of new features. Has this already been discussed elsewhere?This is a minor feature, which does not need previous discussion elsewhere Links to previous discussion of this feature:Linked PRsActivity
MetadataMetadataAssigneesLabels3.13only security fixesonly security fixestype-featureA feature request or enhancementA feature request or enhancement ProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |