-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use count
for +, - in Species
and remove tryparse
#64
Comments
Also make sure that something like "He+-" is caught. |
Working on it, though I'm more certain of how to catch "+-" than how to use count; since the name needs to catch charge markers eg +, ++, +3, +4, etc. tryparse is good because it just converts the string to the int. |
Try this: After the first |
Why do the +- need to be consecutive? |
Likely a typo then. Nobody writes |
Just because nobody writes it like that doesn't mean the code needs to impose such a restriction, especially if it lets us use |
Catching typos is important. And parsing the species string is so simple I don't see the loss of |
Also allowing a non-standard syntax can possibly hinder portability with other codes. |
Actually you can use |
I agree wholeheartedly with the importance of catching typos!
Having worked on a code (which shall remain nameless) that
sometimes failed to catch even the simplest human “errors”,
and thereby made it possible for many scientists (including me)
to waste *days* of precious time, I firmly believe in limiting the
amount of rope we give our users. They’ll find plenty of ways to
hang themselves, but let’s not make it easy.
Dan
…On Sat, Oct 5, 2024 at 05:51 David Sagan ***@***.***> wrote:
Actually you can use count. Just make sure that + and - are not both
present.
—
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXTUHCLIR6YRCXRPI7XOV3ZZ7HD7AVCNFSM6AAAAABO3QYNC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGAZTAOBRGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
See PR #126 |
No description provided.
The text was updated successfully, but these errors were encountered: