[Chicago] python 3.0 hep

Daniel Griffin dgriff1 at gmail.com
Tue Dec 9 19:06:49 CET 2008


Its off topic but I have a quick question. In C/C++ you would use
pre-processor defines to tell a codebase what platform or language version
you are using.

Is  if sys.version < "3":   or the equivalent for platform the correct way
to deal with this in Python or are there other facilities? I know its rare
that this stuff matters, but it does come up.

Thanks,
Dan



On Tue, Dec 9, 2008 at 12:01 PM, Ted Pollari <tcp at mac.com> wrote:

>
> On Dec 9, 2008, at 9:52 AM, Martin Maney wrote:
>
>  It may be impractical, but he's not wrong: testing is literally trying
>> to "prove" a negative (the code has no errors) by showing that this
>> case works, and that case works, ....
>>
>
> That's one view/use of testing but it's by far not the only one.
>
> Testing can and is used to assure that bugs, once identified, are fixed and
> not inadvertently reintroduced, for example.
>
> Testing is also used to prove that the code works for at least some set of
> intended inputs/uses.  That's still extremely valuable because doing that by
> hand is time consuming and not guaranteed to be accurate if there are a
> large number of cases.  Making the jump to saying that the code has no
> errors is either faulty logic or an intentional bit of exaggeration for
> arguments' sake.
>
>
> That's my take at least and I'm sure there are much wiser folks than I on
> this issue.
>
>
> -tcp
>
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20081209/bb5b7bfe/attachment-0001.htm>


More information about the Chicago mailing list