summaryrefslogtreecommitdiffstats
path: root/Tools/world
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-10-02 14:14:39 (GMT)
committerBarry Warsaw <barry@python.org>1998-10-02 14:14:39 (GMT)
commitff45d54f31fefd78b70b8a022fbbf7283f45fb08 (patch)
tree26abc3aae793e4ad2c4c1bac1512bfe6e80c25c5 /Tools/world
parentdfede31c7f52f91195f3e9a6cf7c103e23e63d50 (diff)
downloadcpython-ff45d54f31fefd78b70b8a022fbbf7283f45fb08.zip
cpython-ff45d54f31fefd78b70b8a022fbbf7283f45fb08.tar.gz
cpython-ff45d54f31fefd78b70b8a022fbbf7283f45fb08.tar.bz2
resolve(): Improved use of a/an, suggested by Tino Wildenhain
<cdtv@amigager.de>.
Diffstat (limited to 'Tools/world')
-rwxr-xr-xTools/world/world6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tools/world/world b/Tools/world/world
index 4fb95f3..6d85154 100755
--- a/Tools/world/world
+++ b/Tools/world/world
@@ -110,7 +110,11 @@ def resolve(rawaddr):
return rawaddr
addr = parts[-1]
if nameorgs.has_key(addr):
- print rawaddr, 'is from a', nameorgs[addr], 'organization'
+ if string.lower(nameorgs[addr][0]) in 'aeiou':
+ ana = 'an'
+ else:
+ ana = 'a'
+ print rawaddr, 'is from', ana, nameorgs[addr], 'organization'
return None
elif countries.has_key(addr):
print rawaddr, 'originated from', countries[addr]