Re: [Python-ideas] New PEP proposal -- Pathlib Module ShouldContain All File Operations -- version 2

2018-03-23 Thread Jason Maldonis
> > I’ve found it odd that there doesn’t even seem to be acknowledgment among > longtime python users that the current hodgepodge is pretty dysfunctional > for new users. > I find this odd too. There have been a few comments along the lines of this being a problem for newbies or for *some* people

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-18 Thread Jason Maldonis
On Sun, Mar 18, 2018 at 4:16 PM, George Fischhof wrote: > Hi Jason, > > the status of os and shutil became this because of C functions in > implementation (I got something similar answer before) > ... > > What do you think, what would be a good way to solve this > - add stuff from os to shutil >

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-18 Thread Jason Maldonis
> > Surely shutil is a *high* level modules. > os is a low level module that shutil builds on. > Adding the missing pieces to shutil would make it the place to go to do > file operations. > Pity its not called filelib. > Gotcha, thank you! shutil being a high level library complicates things... So

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-18 Thread Jason Maldonis
Maybe this is obvious or I am missing something crucial, but I'm surprised that this hasn't been discussed yet: >From a user perspective, imo the problem is that users currently need three modules (pathlib, os, and shutil) to have a nice interface for working with, copying, and removing files. In

Re: [Python-ideas] Repurpose `assert' into a general-purpose check

2017-11-27 Thread Jason Maldonis
> > Assertions should not be used as shorthands for "if cond: raise Exc" > in the general case. > I'm just a lurker and usually I agree with why the suggested features shouldn't be implemented, but I actually might chime in to pitch this one a bit more -- and I think it can be done nicely without

Re: [Python-ideas] the error that raises an AttributeError should be passed to __getattr__

2017-06-19 Thread Jason Maldonis
First, I apologize for the poor post. Your corrections were exactly correct: This is only relevant in the context of properties/descriptors, and the property swallows the error message and it isn't printed to screen. I should not be typing without testing. > So... what precisely should be passed

[Python-ideas] the error that raises an AttributeError should be passed to __getattr__

2017-06-19 Thread Jason Maldonis
Hi everyone, A while back I had a conversation with some folks over on python-list. I was having issues implementing error handling of `AttributeError`s using `__getattr__`. My problem is that it is currently impossible for a `__getattr__` in Python to know which method raised the `AttributeError