[Tutor] Is there a way to store and later use comparison operators (<, <=, =, >=, >) ?

boB Stepp robertvstepp at gmail.com
Thu Apr 30 05:49:46 CEST 2015


On Wed, Apr 29, 2015 at 4:42 PM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:

> This isn't a job for Bicycle Repair Man!!!

<chuckle!> Not even if we only use the latest, greatest,
computer-aided bicycle repair technology???

> ... It smacks to me of dictionaries
> and the operator module but I'm too bone idle to look it up myself, so try
> here https://docs.python.org/3/library/operator.html
> D'oh :)

So little time, so much Python standard library! I *do* search and
search and ... search before I ask, but my Google-fu is often weak,
especially when I am searching for hints as to how to solve a problem
where I am unsure of the correct technical terminology to use in the
search. OTH, I have sometimes spent hours searching, both online and
in what books I have, and thus spared y'all many, ... , many other
questions that I might have otherwise asked!

One problem I have with searching the Python documentation is this:
https://docs.python.org/release/2.4.4/lib/lib.html
I never would have guessed beforehand that I would be needing to look
under: "3. Python Runtime Services! I spend most of my time on this
page as this is my most limiting version of Python that I must deal
with.

This page is *not* well-formatted and it all runs together. Even when
I *know* something is there, I find myself having to Ctrl-F and
entering the term I am looking for. And when I am not sure what I am
looking for, I don't usually come up with the correct term. The later
Python docs are much easier on the eyes, I do say!

Anyway, Mark, thanks for the link! This looks quite straightforward
and I will be able to side-step the evils of eval() once again.

-- 
boB


More information about the Tutor mailing list