On Tue, Jun 7, 2011 at 3:36 AM, antoine.pitrou <python-checkins at python.org> wrote: > + @property > + def sentinel(self): > + ''' > + Return a file descriptor (Unix) or handle (Windows) suitable for > + waiting for process termination. > + ''' > + try: > + return self._sentinel > + except AttributeError: > + raise ValueError("process not started") > + We should probably follow this model for threading.Thread.ident as well (i.e. throwing an exception rather than returning None if the thread hasn't been started yet). Also, for runtime state errors, we tend to use RuntimeError rather than ValueError (e.g. see the errors thrown by contextlib._GeneratorContextManager) Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4