'os' imported but unused enjoy.py:3:1: E302 expected 2 blank lines, found 1 enjoy.py:4:5: F841 local variable 'i' is assigned to but never used enjoy.py:9:5: E303 too many blank lines (2)
MySQLdb conn = MySQLdb.connect(db='enjoy') with conn.cursor() as cursor: cursor.execute('SELECT UUID_SHORT() as uuid') print(cursor.fetchone().get('uuid'))
fetch(session, url): with aiohttp.Timeout(10, loop=session.loop): async with session.get(url) as response: return await response.text() async def main(loop): async with aiohttp.ClientSession(loop=loop) as session: html = await fetch(session, 'http://python.org') loop = asyncio.get_event_loop() loop.run_until_complete(main(loop))