On Tue, Jun 7, 2011 at 3:36 AM, antoine.pitrou <python-check...@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 | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com