RE: prePEP: Decimal data type
From: Tim Peters (tim.one_at_comcast.net)
Date: 11/06/03
- Next message: Sebastian Meyer: "Re: Strange problems with encoding"
- Previous message: Tim Peters: "RE: prePEP: Decimal data type"
- In reply to: Aahz: "Re: prePEP: Decimal data type"
- Next in thread: John Roth: "Re: prePEP: Decimal data type"
- Reply: John Roth: "Re: prePEP: Decimal data type"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 6 Nov 2003 10:51:49 -0500 To: <python-list@python.org>
[Aahz]
> Well, sure. And it won't be hard to add given that Decimal will
> already need to track thread-specific Context. But modules changing
> Context will still need to explicitly push and pop Context because
> usually you will just want to replace the current Context.
They have another choice, because Guido had a brilliant idea: the
arithmetic operations in Eric's implementation are methods *of* a context
object (because Guido suggested that). So a maximally robust library
doesn't *have* to change the thread context at all: it can create whatever
private context object(s) it needs, and spell arithmetic as explicit method
calls on its private context object(s), so that the default thread context
object is neither consulted nor modified. This is very robust, and in small
doses is quite bearable.
- Next message: Sebastian Meyer: "Re: Strange problems with encoding"
- Previous message: Tim Peters: "RE: prePEP: Decimal data type"
- In reply to: Aahz: "Re: prePEP: Decimal data type"
- Next in thread: John Roth: "Re: prePEP: Decimal data type"
- Reply: John Roth: "Re: prePEP: Decimal data type"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|