On Tue, May 29, 2018 at 10:11:22AM +1000, Chris Angelico wrote:
> On Tue, May 29, 2018 at 9:47 AM, Steven D'Aprano wrote:
> > Certainly not. You only have to be root to change permissions on files
> > that you otherwise wouldn't be able to change permissions on. chmod -R
> > works fine for
On Tue, May 29, 2018 at 9:47 AM, Steven D'Aprano wrote:
> On Mon, May 28, 2018 at 10:13:47PM +0100, Barry wrote:
>>
>> > On 28 May 2018, at 21:23, Giampaolo Rodola' wrote:
> [...]
>> > It appears like a common enough use case to me ("chown -R path").
>> > Thoughts?
>>
>> I wonder if it is very
On Mon, May 28, 2018 at 10:13:47PM +0100, Barry wrote:
>
> > On 28 May 2018, at 21:23, Giampaolo Rodola' wrote:
[...]
> > It appears like a common enough use case to me ("chown -R path").
> > Thoughts?
>
> I wonder if it is very common.
> Don’t you have to be root or use sudo chown?
> In which
Michael Lohmann wrote:
I just wanted to override the
class-variable `magic_number` to give a reason why I don’t ever want to call
Magic.__init__ in Foo. If you want, you can have this class instead:
class Magic:
> def __init__(self): raise RuntimeError("Do not initialize this
Michael Lohmann wrote:
class Ethel(Aardvark, Clever):
"""Ethel is a very clever Aardvark"""
def __init__(self):
super().__init__(quantity="some spam", cleverness=1000))
>>
if you want to instantiate an Aardvark directly there is NO WAY EVER that
you could give him
path.py Path.choen supports names in addition to the uid/gid numbers which
os.chown supports:
https://pathpy.readthedocs.io/en/stable/api.html#path.Path.chown
https://github.com/jaraco/path.py/blob/master/path.py#L1176
https://pathpy.readthedocs.io/en/stable/api.html#path.Path.walk
On Monday,
> On 28 May 2018, at 21:23, Giampaolo Rodola' wrote:
>
> ...as in (not tested):
>
> def _rchown(dir, user, group):
> for root, dirs, files in os.walk(dir, topdown=False):
> for name in files:
> chown(os.path.join(root, name), user, group)
>
> def
...as in (not tested):
def _rchown(dir, user, group):
for root, dirs, files in os.walk(dir, topdown=False):
for name in files:
chown(os.path.join(root, name), user, group)
def chown(path, user=None, group=None, recursive=False):
if recursive
I would just open an issues on bugs.python.org for this.
On Wed, 23 May 2018 at 17:54 Bradley Phillips <
bradleyp81+python-id...@gmail.com> wrote:
> Hi All
>
> There are about 347 results for the following query on the google search
> engine:
> "python multiprocessing pyinstaller crash
On 28 May 2018 at 10:17, Greg Ewing wrote:
> Nick Coghlan wrote:
>
>> Aye, while I still don't want comprehensions to implicitly create new
>> locals in their parent scope, I've come around on the utility of letting
>> inline assignment targets be implicitly nonlocal
Bright idea the moment after sending that mail:
You could remove the globals() hack if you make it a class decorator instead.
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct:
2018-05-28 11:07 GMT+02:00 Michael Lohmann :
> But maybe it is just me who thinks that you should make it as obvious as
> possible what a class itself really can get as an input and what is done just
> to get the multiple inheritance to work... So I think if no one else
2018-05-28 9:44 GMT+02:00 Michael Lohmann :
>
>> I'd say NOT wanting to call an __init__ method of a superclass is a
>> rather uncommon occurence. It's generally a huge error. So I think
>> it's worth not accomodating that.
>
> I will give you an example then where I am
> I'd say NOT wanting to call an __init__ method of a superclass is a
> rather uncommon occurence. It's generally a huge error. So I think
> it's worth not accomodating that.
I will give you an example then where I am absolutely fine with calling
super().__init__ in all classes and describe why
I'd say NOT wanting to call an __init__ method of a superclass is a
rather uncommon occurence. It's generally a huge error. So I think
it's worth not accomodating that.
2018-05-28 9:27 GMT+02:00 Michael Lohmann :
>
>>>class Magic:
>>>magic_number = 42
>>>
>>class Magic:
>>magic_number = 42
>>def __init__(self):
>>A.magic_number = 0 # As soon as you look too deep into it all
>> the Magic vanishes
>
> What is A here? Did you mean something else?
Sorry for that. Yes, it should have been Magic (I renamed the class
2018-05-26 11:24 GMT+02:00 Antoine Rozo :
> Dismiss my message, I have read `if "art_wt" not in article`. But in the
> same way, you could have a function to reset a value in your dict if the
> current value evaluates to False.
That won't work, since at other places, I do
2018-05-26 11:00 GMT+02:00 Kirill Balunov :
> The main point is to collect more information, since the idea of assignment
> expression will have a huge impact in all aspects of Python programming: how
> you structure your programm, how you write code, how you read code,
18 matches
Mail list logo