Page MenuHomePhabricator

Natural numbers in an untyped list are not equal to the same natural number not in a list.
Open, MediumPublicBUG REPORT


Steps to replicate the issue (include links if applicable):

return Z12696K2 in Z12696K1)”.

What happens?:
The test fails.

What should have happened instead?:
The test should pass (as it does with the current Python implementation).

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Current implementation is:

def Z12696(Z12696K1, Z12696K2):

if Z12696K2 in Z12696K1:

		return True

if type(Z12696K2) is not int:

		return False


		for element in Z12696K1:
				if int(element.Z13518K1) == Z12696K2:
					return True #int was hiding
				pass #Wikifunctions.Debug(str(element))

return False

(Pardon my Python, but the abovementioned test only passes in the else branch, implying that K2 is <int> and the matching element in K1 is not <int>. That is because it is <class 'python3.ztypes.ZObject'> in Python.)

I thought I’d already raised this but I can’t find it. Apologies if this is a duplicate. Presumably linked to T359233, but that is specifically for a Typed list and not explicitly when the type is “Z1”.