Re: Help improve program for parsing simple rules



On Apr 17, 1:26 pm, Aaron Brady <castiro...@xxxxxxxxx> wrote:
Hi, not to offend; I don't know your background.  

Courtesy on Usenet!!! I'm going to go buy a lottery ticket!

Not to worry, I'm a big boy. People have even called my baby ugly,
and I manage to keep my blood pressure under control.

One thing I like
about Python is it and the docs are careful about short-circuiting
conditions.  ISTR that C left some of those details up to the compiler
at one point.

def f():

...     print( 'in f' )
...     return 10
...>>> 0<f()<20

in f
True>>> 0<f() and f()<20

in f
in f
True

Therefore, if op{n} has side effects, 'op1 operator1 op2 AND op2
operator2 op3' is not equivalent to 'op1 optor1 op2 optor2 op3'.

Interesting point, but I don't remember that "A < B < C" is valid C
syntax, are you perhaps thinking of a different language?

By luck, my implementation of EvalComparisonOp.eval does in fact
capture the post-eval value of op2, so that if its evaluation caused
any side effects, they would not be repeated.

-- Paul

.



Relevant Pages

  • Re: puzzle
    ... > (such as an approximate date when you discovered Usenet). ... >>This is because a truly irritating, verbose, etc. person monopolizes ... >>your time in an oral encounter where the ordinary rules of courtesy ... geeks are unable to narrate the ...
    (comp.programming)
  • Re: puzzle
    ... (such as an approximate date when you discovered Usenet). ... >This is because a truly irritating, verbose, etc. person monopolizes ... >your time in an oral encounter where the ordinary rules of courtesy ... geeks are unable to narrate the ...
    (comp.programming)
  • Re: puzzle
    ... >To be theoretical is not to deny the worth of data. ... I first acquired access to Usenet about the same time. ... >>>This is because a truly irritating, verbose, etc. person monopolizes ... >>>your time in an oral encounter where the ordinary rules of courtesy ...
    (comp.programming)
  • Re: [OT] Given up smoking
    ... they ought to worry about a fart. ... It's the courtesy, me being able to go ANYWHERE PUBLIC without ... But I won't defecate on your carpet and won't fart next to you ... that heroine or crack addicts can't really be expected to be rational ...
    (uk.comp.sys.mac)
  • Re: Policeman who murdered innocent man given free holiday at taxpayers expense
    ... > particular bar of my cage). ... Don't worry about it. ... There are some people on usenet who I just don't care in the least what ... But generally, although I often disagree with people, if they can make a ...
    (uk.legal)