Skip to content

Commit dcf6e8c

Browse files
Use Interpreter for unmanaged interpreters.
1 parent a58626f commit dcf6e8c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Lib/test/support/interpreters/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,13 @@ def create():
7979

8080
def list_all():
8181
"""Return all existing interpreters."""
82-
mainid = _interpreters.get_main()
8382
return [Interpreter(id, _owned=owned)
84-
for id, owned in _interpreters.list_all()
85-
if owned or id == mainid]
83+
for id, owned in _interpreters.list_all()]
8684

8785

8886
def get_current():
8987
"""Return the currently running interpreter."""
9088
id, owned = _interpreters.get_current()
91-
if not owned and id != _interpreters.get_main():
92-
# XXX Support this?
93-
raise InterpreterError('current interpreter was created externally')
9489
return Interpreter(id, _owned=owned)
9590

9691

@@ -168,6 +163,7 @@ def _decref(self):
168163
def id(self):
169164
return self._id
170165

166+
# XXX Is this the right name?
171167
@property
172168
def owned(self):
173169
return self._owned

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy