# Cannot index UVs by [0]/[1] or .x/.y (broken coordinates in python!)

Trying to get the XY of a uv_layer[index].uv by using [0] and 1, or .x and .y, return extremely weird results. However using the uv value itself (e.g. print(uv_layer[index].uv)) gives correct results. Example:

This is not just a printing issue. When writing the values to a file, I get these same broken values in the file. Seems only that 0.0/0.0001 coords are broken maybe?

How do I obtain the correct X and Y values, individually?

That's not specifically a blender issue, it is showing the inaccuracy of representing a decimal number in binary storage. The python docs have a page explaining the issue and show some ways around it, the best is probably using format() which replaces the older '%.3g' % val style.
>>> val = 0.1 + 0.2