R
Roy Smith
Ant said:In Steven's defence, string exceptions *are* probably worth less, as
there's no longer such a demand for them.
You just wait until they start showing up on Antiques Roadshow
Ant said:In Steven's defence, string exceptions *are* probably worth less, as
there's no longer such a demand for them.
...
Being a string AND being non-empty is insufficient too -- just try
gmpy.mpz("Hello, I am a string and definitely not empy!", 10)
on for size.
Alex
How do you know that s is a string?
Seems like a fair assumption given the OP's question and example.
This is a simple way to do it i think
s=hello
.... print "Empty"
.... else:
.... print s
....
hello
This is a simple way to do it i think
s=hello
... print "Empty"
... else:
... print s
...
hello
Alex said:They're actually deprecated, not depreciated.
Searching define:deprecated -- first hit:
In computer software standards and documentation, deprecation is the
gradual phasing-out of a software or programming language feature.
en.wikipedia.org/wiki/Deprecated
and the other four hits are fine too.
Searching define:depreciated , we move almost entirely into accounting
and finance, except:
http://en.wikipedia.org/wiki/Depreciated
"""
Depreciated is often confused or used as a stand-in for "deprecated";
see deprecation for the use of depreciation in computer software
"""
Alex
Your point would be important if the question were "How can I tell if x
is an empty string?" On the other hand, "How to check if a string is
empty?" implies that the OP already knows it is a string. Maybe he's
been using string methods on it, maybe he got it from a function that he
knows provides a string. Maybe he's checked its type. It doesn't really
matter, if he's aware it is a string he doesn't have to test it for
stringness.
Larry Bates said:Isn't deprecated like depreciated but not quite to zero yet?
...
No. "To deprecate" comes from a Latin verb meaning "to ward off a
disaster by prayer"; when you're saying you deprecate something, you're
saying you're praying for that something to disappear, go away; in a
secular context, you're earnestly imploring people to NOT do it.
"To depreciate" comes from a Latin verb meaning "to reduce the price";
when you're saying you depreciate something, you're saying you put on
that something a lower price (and, by extension, a lower value) than it
has (or, more commonly, used to have). You're not necessarily saying
it's worth nothing at all (accountants sometimes deem an asset "fully
depreciated" to mean something close to that, but the adverb "fully" is
crucial to this meaning), just that it's worth "less than before".
...
No. "To deprecate" comes from a Latin verb meaning "to ward off a
disaster by prayer"; when you're saying you deprecate something, you're
saying you're praying for that something to disappear, go away; in a
secular context, you're earnestly imploring people to NOT do it.
"To depreciate" comes from a Latin verb meaning "to reduce the price";
when you're saying you depreciate something, you're saying you put on
that something a lower price (and, by extension, a lower value) than it
has (or, more commonly, used to have). You're not necessarily saying
it's worth nothing at all (accountants sometimes deem an asset "fully
depreciated" to mean something close to that, but the adverb "fully" is
crucial to this meaning), just that it's worth "less than before".
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.