Andres Ayala added the comment:
Script to reproduce:
import os
import pathlib
# Change to the Root directory
os.chdir('/')
# Create a relative path object.
p = pathlib.Path('spam')
print(p.resolve())
Expected output:
/span
Incorrect output
//span
Change by Andres Ayala :
--
nosy: +killerrex
___
Python tracker
<https://bugs.python.org/issue33660>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andres Ayala added the comment:
I see, with mixed types you need to use __new__ to construct the elements (I
imagine is specially important for non mutable types)
I have modified the example of the coordinates to try to use a mixed type. Is
not the most useful thing, but it mix the bytes
New submission from Andres Ayala :
I have to read and write many files for an old fortran program where the
elements are coded as integer (so 0 is the X, 1 is the Y...) and I have some
tags associated to each one.
So I tried to create an Enum with some additional fields:
class Coord(Enum