Skip to content

web.Application object have a boolean value of False #4102

Closed
@Ricordel

Description

Long story short

Not a huge issue but a bit unsettling: the boolean value of web.Application() is False

Expected behaviour

import aiohttp.web
app = aiohttp.web.Application()
if app:
    print("true")
else:
    print("false")

should print true

Actual behaviour

Prints false

Steps to reproduce

Create an app like in the above code

Your environment

OS: Linux Ubuntu 19.04
python: Python 3.7.3
aiohttp and deps:

aiohttp==3.6.1
async-timeout==3.0.1
attrs==19.1.0
chardet==3.0.4
idna==2.8
multidict==4.5.2
pkg-resources==0.0.0
yarl==1.3.0

Metadata

Assignees

No one assigned

    Labels

    HacktoberfestWe think it's good for https://hacktoberfest.digitalocean.com/good first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions