does python have useless destructors?
Michael Hudson
mwh at python.net
Fri Jun 18 07:38:36 EDT 2004
Roy Smith <roy at panix.com> writes:
> > > Maybe I don't need it, maybe 310 gives me RAII and that's what
> > > I really need. I don't know, but again, 310 doesn't give me
> > > anything of consequence in terms of software architecture.
>
> I just read PEP-310, and there's something I don't understand. It says:
>
> > Note that this makes using an object that does not have an
> > __exit__() method a fail-fast error.
>
> What does "fail-fast" mean?
Hmm, that should be clarified. Basically the idea is that you'll get
an attribute error if you try to use an object in a with: clause that
isn't meant to be used there (as opposed to your program doing
something other than what you expect).
Cheers,
mwh
--
I'd certainly be shocked to discover a consensus. ;-)
-- Aahz, comp.lang.python
More information about the Python-list
mailing list