[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2018-06-01 Thread Andres Ayala
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

[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2018-05-30 Thread Andres Ayala
Change by Andres Ayala : -- nosy: +killerrex ___ Python tracker <https://bugs.python.org/issue33660> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33437] Defining __init__ in enums

2018-05-08 Thread Andres Ayala
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

[issue33437] Defining __init__ in enums

2018-05-07 Thread Andres Ayala
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