HN user

stillinbeta

12 karma
Posts0
Comments9
View on HN
No posts found.

In most circumstances for (key, val) in data won't work, as the default dictionary iterable only contains the keys. You want for key, val in data.items():

Nine times out of ten I'd say you could probably just install from the AUR. If not I doubt you could do so programatically, because the names might not be the same.

It seems odd that it only returns a province/state when just the area code provides more information than that. Example: any (647) or (416) area code will always be from Toronto, but numbers for both just return ONTARIO.

/dev/random will block while waiting to collect entropy from the system. /dev/urandom will be satisfied with pseudorandom numbers. That's fine for many applications (e.g. a file filled with garbage) but not acceptable for things like cryptography.