Staging
v0.5.1
https://github.com/python/cpython
Revision 9db66a2b5ab6a302bc46421712f13b0afd94654b authored by Miss Islington (bot) on 29 August 2019, 14:54:37 UTC, committed by GitHub on 29 August 2019, 14:54:37 UTC

Adds a link to `dateutil.parser.isoparse` in the documentation.

It would be nice to set up intersphinx for things like this, but I think we can leave that for a separate PR.

CC: @pitrou

[bpo-37979](https://bugs.python.org/issue37979)

https://bugs.python.org/issue37979

Automerge-Triggered-By: @pitrou
(cherry picked from commit 59725f3badb3028636c8906ecac4ceb0a37f3982)

Co-authored-by: Paul Ganssle <paul@ganssle.io>
1 parent 384c6d7
Raw File
Tip revision: 9db66a2b5ab6a302bc46421712f13b0afd94654b authored by Miss Islington (bot) on 29 August 2019, 14:54:37 UTC
bpo-37979: Add alternative to fromisoformat in documentation (GH-15596)
Tip revision: 9db66a2
antigravity.py

import webbrowser
import hashlib

webbrowser.open("https://xkcd.com/353/")

def geohash(latitude, longitude, datedow):
    '''Compute geohash() using the Munroe algorithm.

    >>> geohash(37.421542, -122.085589, b'2005-05-26-10458.68')
    37.857713 -122.544543

    '''
    # https://xkcd.com/426/
    h = hashlib.md5(datedow).hexdigest()
    p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
    print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))
back to top