[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2019-02-17 Thread gary ruben
gary ruben added the comment: I wanted to add a datapoint to this. I also experience this problem in Windows but not with Google Drive File Stream. In my case it is also being triggered by Jupyter, which was where Deniz first noticed it, but I was saving the notebook to my Z: drive, which

Re: class factory example needed (long)

2005-03-03 Thread Gary Ruben
Thanks Steven and Kent, both of your suggestions look good to me. I'll try both out and pick one. Gary Gary Ruben wrote: OK, I've managed to get this to work with Rainer's method, but I realised it is not the best way to do it, since the methods are being added by the constructor, i.e

Re: class factory example needed (long)

2005-03-01 Thread Gary Ruben
OK, I've managed to get this to work with Rainer's method, but I realised it is not the best way to do it, since the methods are being added by the constructor, i.e. they are instance methods. This means that every time a foo object is created, a whole lot of code is being run. It would be

Re: class factory example needed (long)

2005-02-28 Thread Gary Ruben
Thanks for the very helpful reply Rainer, I thought I couldn't use setattr because I need the syntactic sugar sqrt(f) to work, but with your example code Numeric.sqrt(f) does in fact work correctly. I also need to do a bit more than may be possible with a simple lambda function, but I should be

class factory example needed (long)

2005-02-26 Thread Gary Ruben
I have a class factory problem. You could say that my main problem is that I don't understand class factories. My specific problem: I have a class with several methods I've defined. To this class I want to add a number of other class methods where the method names are taken from a list. For each