annotations cause dataclass fields type side effects

2021-08-09 Thread Lukas Lösche
types of all fields in a dataclass are what they are supposed to be. But as soon as I import annotations from __future__ this validation breaks as the arg that I'm passing to isinstance() is no longer a type class but a string. What am I doing wrong? Thanks, -- Lukas -- https://mail.python.org/mailman/listinfo/python-list

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Lukas Barth
r multiply them or some similar > operation. That's your hash that will compare equal for any rotation of a > given sequence. Yes, that sounds like an idea if I decide to just go with the hash. Thanks! Lukas -- https://mail.python.org/mailman/listinfo/python-list

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Lukas Barth
listN...) against which they will be compared later.. Lukas -- https://mail.python.org/mailman/listinfo/python-list

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Lukas Barth
;t sound so great due to storage > requirements.. Also, that still doesn't compute that one "canonical ordering"... Thanks, Lukas -- https://mail.python.org/mailman/listinfo/python-list

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Lukas Barth
same output every time, regardless of what the input rotation was. Example: [0,1,2,3,4] => [0,1,2,3,4] [2,3,4,0,1] => [0,1,2,3,4] [3,4,0,1,2] => [0,1,2,3,4] ... It doesn't have to be "[0,1,2,3,4]", it can just as well be [2,3,4,1,0], as long as it's always the sa

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Lukas Barth
Perhaps I should clarify a bit: - I definitely need a "canonical rotation" - just a comparison result is not enough - It does not matter what that rotation is. Starting with the smallest element was just an idea by me, any rotation that can easily produced will do. -- https://mail.python.org/m

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Lukas Barth
ot; rotation, since I'm hashing this, returning it to other parts of the software, etc.. But thanks! Lukas -- https://mail.python.org/mailman/listinfo/python-list

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Lukas Barth
t; for i in range(length): > if twice[i:i + length] == l2: > return True > return False > Nice idea! But I actually really need those "canonic rotations", since I&#x

Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Lukas Barth
ons of the minimum, see which is followed by the smallest element, and then rotate that position to the front. Now that seems an awful lot of code for a (seemingly?) simple problem. Is there a nice, pythonic way to do this? Thanks for enlightening me! Lukas -- https://mail.python.org/mailma

Re: [pyxl] xlrd 0.7.4 released!

2012-04-03 Thread Lukas Graf
On Tuesday, April 3, 2012 9:34:27 AM UTC+2, Chris Withers wrote: > As pointed out, I stuffed up the release by not including a new file in > the MANIFEST. My bad. > > I've just release a 0.7.5 that fixes this. > Works! Thanks for the quick reaction! Regard

Re: xlrd 0.7.4 released!

2012-04-03 Thread Lukas Graf
s message for any errors that were output by easy_install. Regards, Lukas -- http://mail.python.org/mailman/listinfo/python-list

logging.Handler not working with QThreads

2009-02-25 Thread Lukas Hetzenecker
parameter) 177 Extension:152 (RENDER) Minor opcode: 25 (RenderCompositeGlyphs32) Resource id: 0x0 .. and so on I attatched a small example to this mail. Could anybody tell me what I'm doing wrong? Thanks for you help, Lukas from PyQt4.QtCore import * from PyQt4.QtGui import * i

os.rename() problems on OS X

2008-01-11 Thread lukas
). my problem is that after i rename the files, OS X will no longer render the thumbnails for the files, and preview is no longer the default app for viewing them. Does anyone have an idea as to why this is? Thanks for the help :) -Lukas -- http://mail.python.org/mailman/listinfo/python-list

cx_oracle

2007-06-24 Thread Lukas Ziegler
all last): File "C:\Python25\cal_adjustment.py", line 1, in import cx_Oracle ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden. --- Do someone have an idea to solve the problem? A reinstall doesn't work. Cheers lukas -- http://mail.python.org/mailman/listinfo/python-list

Re: Detect File System changes

2005-12-23 Thread Lukas Meyer
Hello, Thank you for your assistance. I could manage it using your link to the already discussed thread. best regards, Lukas -- http://mail.python.org/mailman/listinfo/python-list

Detect File System changes

2005-12-23 Thread Lukas Meyer
this isn't really working properly. Can anyone give me a hint to get this working? best regards, Lukas -- http://mail.python.org/mailman/listinfo/python-list