Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-03 Thread Chris Angelico
On Wed, Dec 4, 2019 at 4:16 PM Chris Clark wrote: > I think the consensus from the various threads is that the docs are either > lacking or misleading. > > I mentioned that this impacts bytes and the problem there is more telling as > it hard fails (this is how I first discovered this was an iss

RE: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-03 Thread Chris Clark
Thanks for all the replies (and apologies for top posting, I have a brain dead email client ☹). I think the consensus from the various threads is that the docs are either lacking or misleading. I mentioned that this impacts bytes and the problem there is more telling as it hard fails (this is

Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-03 Thread Rob Gaddi
On 12/2/19 5:50 PM, Richard Damon wrote: Perhaps array could be extended so that it took '4' for a 4 byte integer and '8' for an 8 byte integer (maybe 'U4' and 'U8' for unsigned). Might as well also allow 1 and 2 for completeness for char and short (but those are currently consistent). I wil

Re: increasing the page size of a dbm store?

2019-12-03 Thread Tim Chase
On 2019-12-02 16:49, Michael Torrie wrote: > On 12/1/19 7:50 PM, Tim Chase wrote: > > After sparring with it a while, I tweaked the existing job so > > that it chunked things into dbm-appropriate sizes to limp > > through; for the subsequent job (where I would have used dbm > > again) I went ahead

Re: Extending property using a Subclass - single method - why Super(Baz, Baz).name.__set__ ?

2019-12-03 Thread Peter Otten
Veek M wrote: > you've misunderstood my question There were a lot of foobars bazzing in my head, but at least I tried ;) > , let me try again: > > So this is a simple descriptor class and as you can see, dunder-set needs > 3 args: the descriptor CONTAINER/Bar-instance is the first arg, then a >

Re: lxml question -- creating an etree.Element attribute with ':' in the name

2019-12-03 Thread Karsten Hilbert
On Mon, Dec 02, 2019 at 08:58:11PM -0800, gerem...@gmail.com wrote: > Date: Mon, 2 Dec 2019 20:58:11 -0800 (PST) > From: gerem...@gmail.com > To: python-list@python.org > Subject: Re: lxml question -- creating an etree.Element attribute with ':' > in the name > User-Agent: G2/1.0 > > Theanks a lot

Re: lxml question -- creating an etree.Element attribute with ':' in the name

2019-12-03 Thread geremy85
Theanks a lot -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract sentences in nested parentheses using Python

2019-12-03 Thread Peter Otten
A S wrote: > On Tuesday, 3 December 2019 01:01:25 UTC+8, Peter Otten wrote: >> A S wrote: >> >> I think I've seen this question before ;) >> >> > I am trying to extract all strings in nested parentheses (along with >> > the parentheses itself) in my .txt file. Please see the sample .txt >> > fi

Re: Extract sentences in nested parentheses using Python

2019-12-03 Thread A S
On Tuesday, 3 December 2019 01:01:25 UTC+8, Peter Otten wrote: > A S wrote: > > I think I've seen this question before ;) > > > I am trying to extract all strings in nested parentheses (along with the > > parentheses itself) in my .txt file. Please see the sample .txt file that > > I have used i

Re: Extending property using a Subclass - single method - why Super(Baz, Baz).name.__set__ ?

2019-12-03 Thread Veek M
you've misunderstood my question, let me try again: So this is a simple descriptor class and as you can see, dunder-set needs 3 args: the descriptor CONTAINER/Bar-instance is the first arg, then a reference to the using instance/Foo-instance class Bar(object): def __set__(self, instanc

Re: Extending property using a Subclass - single method - why Super(Baz, Baz).name.__set__ ?

2019-12-03 Thread Peter Otten
Veek M wrote: > class Foo(object): > @property > def name(self): > if hasattr(self, '_name'): > print('Foo name', self._name) > return self._name > else: > return 'default' > > @name.setter > def name(self, value): > prin

Extending property using a Subclass - single method - why Super(Baz, Baz).name.__set__ ?

2019-12-03 Thread Veek M
class Foo(object): @property def name(self): if hasattr(self, '_name'): print('Foo name', self._name) return self._name else: return 'default' @name.setter def name(self, value): print('Foo', self) self._name = va