End of file

Andrew Dalke adalke at mindspring.com
Fri Oct 8 13:51:08 EDT 2004


Me:
> I've used
> 
> class sentinel:
>   pass

Also used in the standard lib, in

cookielib.py:

class Absent: pass
   ...
         if path is not Absent and path != "":
             path_specified = True
             path = escape_path(path)
         else:
   ...


Only one that I could find.  The 'object()' approach
is used in gettext.py a few times like

         missing = object()
         tmsg = self._catalog.get(message, missing)
         if tmsg is missing:
             if self._fallback:
                 return self._fallback.lgettext(message)

and once in pickle.py as

      self.mark = object()

Pre-object (09-Nov-01) it used

      self.mark = ['spam']


				Andrew
				dalke at dalkescientific.com



More information about the Python-list mailing list