/SoWrong

Slides/Code for Pycon India 2019 talk

SoWrong

Slides/Code for Pycon India 2019 talk

Code examples in Python that make you go "This is SO wrong"

The idea is to write common stuff in completely absurd ways. For example, why write APIs like this

@app.get('/my/fancy/url')
def handle_in_a_fancy_fashion():
    return 'hi'
    

when you can write them like:

async for request, response in GET('/my/fancy/url'):
    response.body = 'hi'

Unlike WTFPython, this is not about strange things Python can do. It's about doing normal things in strange ways and understanding why those ways are particularly bad.

Todo

  • upload slides on github (once Pycon starts)
  • make code public (once Pycon starts)