XMPMS | Unreal 2 Expanded Multiplayer Master Server | Game Engine library
kandi X-RAY | XMPMS Summary
kandi X-RAY | XMPMS Summary
Once upon a time, Legend Entertainment made an awesome game called Unreal 2 Expanded Mulitplayer (U2XMP), the master server was run by Atari and was about as reliable as British Rail on wet tuesday afternoon. It would frequently go down for long periods and after the termination of Legend Entertainment in January of 2004 it got progressively worse. Some of us worried that the master server would eventually go down for good and had the common sense to make Ethereal logs of the master server protocol to give us a fighting chance of engineering a new Master Server should the official ones ever go down for good. This turned out to be remarkably prescient.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of XMPMS
XMPMS Key Features
XMPMS Examples and Code Snippets
Community Discussions
Trending Discussions on XMPMS
QUESTION
So basically I am trying to retrieve values from a database. My if case is that if the query result which is saved in variable data is None then it should print message data not found. If the value is not none then it should print the data. My problem is that I am on purpose giving it a value which is not present in the database which means data should be null. But my if none case is not triggering. It goes directly to else. I have attached pictures down below. Apologies if this question is too basic.
...ANSWER
Answered 2020-Mar-03 at 17:58This is because you are testing if the data variable is am instance of the None object which, from your output, it's not it's a list.
So all you need to do is to change your if statement to if not data:
which will fix the problem.
Not will pass true for None, False and empty list amongst other things. see Python Truth Value Testing
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install XMPMS
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page