[Tutor] How to Compare rpm version using Python Script
David Rock
david at graniteweb.com
Fri Nov 29 21:27:28 EST 2019
* David <bouncingcats at gmail.com> [2019-11-30 13:07]:
> On Sat, 30 Nov 2019 at 12:01, Alan Gauld via Tutor <tutor at python.org> wrote:
>
> I sometimes use them in my shell scripting where appropriate, due to
> the limited data structures available there, but I've never seen them used
> or advocated anywhere else.
>
> Are there reasons why they are not used more widely by programmers
> to solve simple textual data separation problems?
Two obvious reasons come to mind:
1. People are generally not aware of them
2. They are often overkill when something simpler will work
In the case of our RPM example, using a simple space will get the job
done. While using the unit separator would work, it's a lot more
complicated to use it in practice, and unnecessary. Typing multiple
^V^_ characters to build the format string is a lot more painful than
just hitting the spacebar.
That's not to say these characters don't have value. The RPM case is an
overly-simplistic example where using them is unnecessary, but there are
definitely plenty of cases where finding a character that isn't in your
data is a lot harder.
--
David Rock
david at graniteweb.com
More information about the Tutor
mailing list