On 08Mar2018 20:25, C W wrote:
Thank you guys, lots of great answers, very helpful. I got it!
A follow-up question:
How did the value of "object" get passed to "time"? Obviously, they have
different names. How did Python make that connection?
Code is below for convenience.
class Clock(object
Andrew Z schrieb am 07.03.2018 um 05:03:
> Hello,
> with 3.6 and latest greatest lxml:
>
> from lxml import etree
>
> tree = etree.parse('Sample.xml')
> etree.register_namespace('','http://www.example.com')
The default namespace prefix is spelled None (because there is no prefix
for it) and not
On Fri, 09 Mar 2018 10:22:23 +0100, Stefan Behnel wrote:
> Andrew Z schrieb am 07.03.2018 um 05:03:
>> Hello,
>> with 3.6 and latest greatest lxml:
>>
>> from lxml import etree
>>
>> tree = etree.parse('Sample.xml')
>> etree.register_namespace('','http://www.example.com')
>
> The default names
Steven D'Aprano schrieb am 09.03.2018 um 12:41:
> On Fri, 09 Mar 2018 10:22:23 +0100, Stefan Behnel wrote:
>
>> Andrew Z schrieb am 07.03.2018 um 05:03:
>>> Hello,
>>> with 3.6 and latest greatest lxml:
>>>
>>> from lxml import etree
>>>
>>> tree = etree.parse('Sample.xml')
>>> etree.register_nam
On Fri, 09 Mar 2018 13:08:10 +0100, Stefan Behnel wrote:
>> Is there a good reason not to support "" as the empty prefix?
>
> Well, the "empty prefix" is not an "empty" prefix, it's *no* prefix. The
> result is not ":tag" instead of "prefix:tag", the result is "tag".
That makes sense, thanks.
Stefan Behnel wrote:
> Andrew Z schrieb am 07.03.2018 um 05:03:
>> Hello,
>> with 3.6 and latest greatest lxml:
>>
>> from lxml import etree
>>
>> tree = etree.parse('Sample.xml')
>> etree.register_namespace('','http://www.example.com')
>
> The default namespace prefix is spelled None (because
Peter Otten schrieb am 09.03.2018 um 14:11:
> Stefan Behnel wrote:
>
>> Andrew Z schrieb am 07.03.2018 um 05:03:
>>> Hello,
>>> with 3.6 and latest greatest lxml:
>>>
>>> from lxml import etree
>>>
>>> tree = etree.parse('Sample.xml')
>>> etree.register_namespace('','http://www.example.com')
>>
>
On 03/08/2018 07:57 PM, Steven D'Aprano wrote:
[snip]
But it is possible that due to differences between platforms, the
OP's version of IDLE doesn't display a carriage return as \r but
rather as an invisible zero-width space.
Just to derail this conversation a bit, does anyone have a use case
On 9 March 2018 at 17:46, Rob Gaddi wrote:
> On 03/08/2018 07:57 PM, Steven D'Aprano wrote:
>>
>> [snip]
>>
>> But it is possible that due to differences between platforms, the
>> OP's version of IDLE doesn't display a carriage return as \r but
>> rather as an invisible zero-width space.
>>
>
> Ju
On Sat, Mar 10, 2018 at 5:10 AM, Paul Moore wrote:
> On 9 March 2018 at 17:46, Rob Gaddi wrote:
>> On 03/08/2018 07:57 PM, Steven D'Aprano wrote:
>>>
>>> [snip]
>>>
>>> But it is possible that due to differences between platforms, the
>>> OP's version of IDLE doesn't display a carriage return as
On 9 March 2018 at 01:07, 노연수 wrote:
> If you type print (" hello\ rpython ") into the python 3.7.0.b2, only the
> python is printed and i learned it's a crystal. However, if you type print ("
> hello\ rpython ") in the python 3.7.0.b2 idle, it is output as hellopython. I
> wonder why it prints
On 3/8/2018 7:07 PM, 노연수 wrote:
If you type print (" hello\ rpython ") into the python 3.7.0.b2, only the
python is printed and i learned it's a crystal.
'\r' is a control character than means 'return to the beginning of the
line'. When you execute "print('hello\rpython')" in Python running
I am trying to enumerate all the three-tuples (x, y, z) where each of x,
y, z can range from 1 to ∞ (infinity).
This is clearly unhelpful:
for x in itertools.count(1):
for y in itertools.count(1):
for z in itertools.count(1):
print(x, y, z)
as it never advances beyond x=
On 10/03/2018 01:13, Steven D'Aprano wrote:
I am trying to enumerate all the three-tuples (x, y, z) where each of x,
y, z can range from 1 to ∞ (infinity).
This is clearly unhelpful:
for x in itertools.count(1):
for y in itertools.count(1):
for z in itertools.count(1):
On Sat, Mar 10, 2018 at 12:13 PM, Steven D'Aprano
wrote:
> The Russian mathematician Cantor came up with a *pairing function* that
> encodes a pair of integers into a single one. For example, he maps the
> coordinate pairs to integers as follows:
>
> 1,1 -> 1
> 2,1 -> 2
> 1,2 -> 3
> 3,1 ->
On 2018-03-10 01:13, Steven D'Aprano wrote:
I am trying to enumerate all the three-tuples (x, y, z) where each of x,
y, z can range from 1 to ∞ (infinity).
This is clearly unhelpful:
for x in itertools.count(1):
for y in itertools.count(1):
for z in itertools.count(1):
Stefan,
thank you for the link. That explains the line of thinking of the package
designer(s).
I also looked@ beautifulsoup and found it to work better with my old brains.
On Fri, Mar 9, 2018 at 9:46 AM, Stefan Behnel wrote:
> Peter Otten schrieb am 09.03.2018 um 14:11:
> > Stefan Behnel wrote:
Steven D'Aprano writes:
> I am trying to enumerate all the three-tuples (x, y, z) where each of x,
> y, z can range from 1 to ∞ (infinity).
>
> This is clearly unhelpful:
>
> for x in itertools.count(1):
> for y in itertools.count(1):
> for z in itertools.count(1):
> prin
18 matches
Mail list logo