On 7/20/2017 1:33 AM, Torsten Bronger wrote:
Hallöchen!
With a 24,000 files directory on an SSD running Ubuntu,
#!/usr/bin/python3
import os, time
start = time.time()
list(os.listdir("/home/bronger/.saves"))
listdir returns a list of na
print("listdir:", time.tim
Anders Wegge Keller writes:
> ...
> I have an ongoing issue with my usenet setup. I'm that one dude who don't
> want to learn perl. That means that I have to build inn from source, so I
> can enable the python interpreter. That's not so bad, and the errors that
> show up have been something that
On Thu, 20 Jul 2017 12:40:08 +1000, Chris Angelico wrote:
> On Thu, Jul 20, 2017 at 12:12 PM, Steve D'Aprano
> wrote:
>> On Thu, 20 Jul 2017 08:12 am, Gregory Ewing wrote:
>>
>>> Chris Angelico wrote:
>> [snip overly complex and complicated string implementation]
>>
>>
> An accurate description,
Hallöchen!
With a 24,000 files directory on an SSD running Ubuntu,
#!/usr/bin/python3
import os, time
start = time.time()
list(os.listdir("/home/bronger/.saves"))
print("listdir:", time.time() - start)
start = time.time()
list(os.scandir("/home/bronger/.saves"))
On Thu, Jul 20, 2017 at 12:12 PM, Steve D'Aprano
wrote:
> On Thu, 20 Jul 2017 08:12 am, Gregory Ewing wrote:
>
>> Chris Angelico wrote:
> [snip overly complex and complicated string implementation]
>
An accurate description, but in my own defense, I had misunderstood
Marko's idea. Actually, the i
On Thu, 20 Jul 2017 08:12 am, Gregory Ewing wrote:
> Chris Angelico wrote:
[snip overly complex and complicated string implementation]
> +1. We should totally do this just to troll the RUE!
You're an evil, wicked man, and I love it.
--
Steve
“Cheer up,” they said, “things could be worse.” So
On Tuesday, July 18, 2017 at 12:59:36 AM UTC-5, Terry Reedy wrote:
> Yes, No. The developers of the class agree that a trailing
> underscore convention would have been better. 'source_'
> etc.
Which, while encroaching on the "this-is-a-reserved-symbol_"
convention, would relieve the current "_st
On Thu, 20 Jul 2017 01:30 am, Random832 wrote:
> On Tue, Jul 18, 2017, at 22:49, Steve D'Aprano wrote:
>> > What about Emoji?
>> > U+1F469 WOMAN is two columns wide on its own.
>> > U+1F4BB PERSONAL COMPUTER is two columns wide on its own.
>> > U+200D ZERO WIDTH JOINER is zero columns wide on its
On Tuesday, July 18, 2017 at 5:19:56 AM UTC-5, Rahul K P wrote:
> You can use a simple logic and list comprehension.
>
> so it will be like this
>
> lst = [1, 2, 3, 4, 5, 6, 7, 8]
> print [lst[i:i+2] for i in range(0,len(lst),2)]
No no no. Anybody can write code like that! To wow a
professor and
On Thu, 20 Jul 2017 04:34 am, Mikhail V wrote:
> It is also pretty obvious that these Caps makes it harder to read in general.
> (more obvious that excessive diacritics, like in French)
No it isn't.
--
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, th
Random832 writes:
> On Tue, Jul 18, 2017, at 19:21, Gregory Ewing wrote:
> > Random832 wrote:
> > > What about Emoji?
> > > U+1F469 WOMAN is two columns wide on its own.
> > > U+1F4BB PERSONAL COMPUTER is two columns wide on its own.
>
> Emoji comes from Japanese 絵文字 - 絵(E) picture, 文字(moji)
> ch
On Wednesday, July 19, 2017 at 5:29:23 AM UTC-5, Rhodri James wrote:
> when Acorn were developing their version of extended ASCII
> in the late 80s, they asked three different University
> lecturers in Welsh what extra characters they needed, and
> got three different answers.
And who would have g
On Wednesday, July 19, 2017 at 1:57:47 AM UTC-5, Steven D'Aprano wrote:
> On Wed, 19 Jul 2017 17:51:49 +1200, Gregory Ewing wrote:
>
> > Chris Angelico wrote:
> >> Once you NFC or NFD normalize both strings, identical strings will
> >> generally have identical codepoints... You should then be able
On Wed, Jul 19, 2017 at 6:28 PM, Dennis Lee Bieber
wrote:
> On Wed, 19 Jul 2017 11:15:03 -0400, Larry Martell
> declaimed the following:
>
>>
>>/usr/bin/ld: cannot find -lr_utils
>>
>>But I could not find how to get libr_utils.
>>
>
> Have you already built/installed R (maybe development
On Tuesday, July 18, 2017 at 10:37:18 PM UTC-5, Steve D'Aprano wrote:
> On Wed, 19 Jul 2017 10:34 am, Mikhail V wrote:
>
> > Ok, in this narrow context I can also agree.
> > But in slightly wider context that phrase may sound almost like:
> > "neither geometrical shape is better than the other as
On Tuesday, July 18, 2017 at 7:35:13 PM UTC-5, Mikhail V wrote:
> ChrisA wrote:
> >On Wed, Jul 19, 2017 at 6:05 AM, Mikhail V wrote:
> >> On 2017-07-18, Steve D'Aprano wrote:
> > > > _Neither system is right or wrong, or better than the
> > > > other._
> > >
> > > If that is said just "not to hu
On Tuesday, July 18, 2017 at 10:24:54 PM UTC-5, Steve D'Aprano wrote:
> On Wed, 19 Jul 2017 10:08 am, Ben Finney wrote:
>
> > Gregory Ewing writes:
> >
> > > The term "emoji" is becoming rather strained these days.
> > > The idea of "woman" and "personal computer" being
> > > emotions is an inte
Chris Angelico wrote:
* Strings with all codepoints < 256 are represented as they currently
are (one byte per char). There are no combining characters in the
first 256 codepoints anyway.
* Strings with all codepoints < 65536 and no combining characters,
ditto (two bytes per char).
* Strings with
Grant Edwards wrote:
Maybe it was a mistaken spelling of 'fortuned'?
Most likely. Interestingly, several sites claimed to be able to
tell me things about it. One of them tried to find poetry
related to it (didn't find any, though).
Another one offered to show me how to pronounce it, and it kin
On Tuesday, July 18, 2017 at 10:07:41 PM UTC-5, Steve D'Aprano wrote:
> On Wed, 19 Jul 2017 12:10 am, Rustom Mody wrote:
[...]
> > Einstein: If you can't explain something to a six-year-
> > old, you really don't understand it yourself.
> >
>
> [...]
>
> Think about it: it simply is nonsense. If
On 7/19/2017 4:28 AM, Steven D'Aprano wrote:
On Tue, 18 Jul 2017 10:11:39 -0400, Random832 wrote:
On Fri, Jul 14, 2017, at 04:15, Marko Rauhamaa wrote:
Consider, for example, a Python source code
editor where you want to limit the length of the line based on the
number of characters more typ
On 07/18/2017 12:53 PM, FS wrote:
Thank you for your response Andre. I had tried some code like that in the
document but it did not seem to work. However ever leaving my terminal for a
time the code eventually wrote out the records so apparently there is some very
deep buffering going on here.
Steven D'Aprano wrote:
>On Wed, 19 Jul 2017 10:34 am, Mikhail V wrote:
>> Ok, in this narrow context I can also agree.
>> But in slightly wider context that phrase may sound almost like:
>> "neither geometrical shape is better than the other as a basis
>> for a wheel. If you have polygonal wheels,
On 07/19/2017 03:26 AM, Ganesh Pal wrote:
Yes. Just assert each thing as it needs asserting.
Asserting each sub test will fail the entire test, I want the to pass
the test if any the sub test passes. If the sub test fail try all cases
and fail for the last one.
Example :
def test_th
On 2017-07-19 09:29, Marko Rauhamaa wrote:
Gregory Ewing :
Marko Rauhamaa wrote:
* a final "v" receives a superfluous "e" ("love")
It's not superfluous there, it's preventing "love" from looking like
it should rhyme with "of".
I'm pretty sure that wasn't the original motivation. If I had
On 7/19/2017 8:24 AM, Peter Otten wrote:
Ganesh Pal wrote:
(1) I would want my subtest to have a *Condition* based on which it that
would pass my entire test if any of the sub-test passed.
If I understand correctly, you want
assertTrue(subtest1 or subtest2 or subtest3 or subtest4 ...)
o
On 19/07/17 04:19, Rustom Mody wrote:
> On Wednesday, July 19, 2017 at 3:00:21 AM UTC+5:30, Marko Rauhamaa wrote:
>> Chris Angelico :
>>
>>> Let me give you one concrete example: the letter "ö". In English, it
>>> is (very occasionally) used to indicate diaeresis, where a pair of
>>> letters is not
Hi! I have no experience on that, but I may ask something that might help:
1- are you aware that it's not safe to use pip directly? It could be safer
to use pip install --user package.
2- Are you able to use virtualenv? This usually let me install packages my
system has problems on working out.
Cy
Hey, I have no experience on it, but maybe I'm able to help. How are you
tryin to install it? Pip? 2 or 3? Virtualenv?
Cya!
Em qua, 19 de jul de 2017 10:22, Larry Martell
escreveu:
> Anyone here any experience with the rpy2 package? I am having trouble
> getting it to install, and I have posted
On Thu, Jul 20, 2017 at 1:45 AM, Marko Rauhamaa wrote:
> So let's assume we will expand str to accommodate the requirements of
> grapheme clusters.
>
> All existing code would still produce only traditional strings. The only
> way to introduce the new "super code points" is by invoking the
> str.c
Chris Angelico :
> Now, this is a performance question, and it's not unreasonable to talk
> about semantics first and let performance wait for later. But when you
> consider how many ASCII-only strings Python uses internally (the names
> of basically every global function and every attribute in ev
I have an ongoing issue with my usenet setup. I'm that one dude who don't
want to learn perl. That means that I have to build inn from source, so I
can enable the python interpreter. That's not so bad, and the errors that
show up have been something that I have been able to figure out by myself.
A
On Tue, Jul 18, 2017, at 22:49, Steve D'Aprano wrote:
> > What about Emoji?
> > U+1F469 WOMAN is two columns wide on its own.
> > U+1F4BB PERSONAL COMPUTER is two columns wide on its own.
> > U+200D ZERO WIDTH JOINER is zero columns wide on its own.
>
>
> What about them? In a monospaced font, th
On Tue, Jul 18, 2017, at 19:21, Gregory Ewing wrote:
> Random832 wrote:
> > What about Emoji?
> > U+1F469 WOMAN is two columns wide on its own.
> > U+1F4BB PERSONAL COMPUTER is two columns wide on its own.
>
> The term "emoji" is becoming rather strained these days.
> The idea of "woman" and "pers
On Wed, Jul 19, 2017 at 10:49 AM, Felipe Bastos Nunes
wrote:
> Hey, I have no experience on it, but maybe I'm able to help. How are you
> tryin to install it? Pip? 2 or 3? Virtualenv?
python2.7, using pip, on Redhat 6, R version 3.3.3:
Collecting rpy2
Using cached rpy2-2.8.6.tar.gz
Requirement
On Wed, Jul 19, 2017 at 11:42 PM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Perhaps we don't have the same understanding of "constant time". Or
>> are you saying that you actually store and represent this as those
>> arbitrary-precision integers? Every character of every string has to
>> be a
Grant Edwards :
> On 2017-07-19, Gregory Ewing wrote:
>> Grant Edwards wrote:
>>>vacuum, continuum, squush, fortuuned
>>
>> Fortuuned? Where did you find that?
>
> It was in the scowl-7.1 wordlist I had laying around:
>
> http://wordlist.aspell.net/
>
> However, the scowl website now claims
On 2017-07-19, Gregory Ewing wrote:
> Grant Edwards wrote:
>>vacuum, continuum, squush, fortuuned
>
> Fortuuned? Where did you find that?
It was in the scowl-7.1 wordlist I had laying around:
http://wordlist.aspell.net/
However, the scowl website now claims not to know about it:
http:/
Chris Angelico :
> Perhaps we don't have the same understanding of "constant time". Or
> are you saying that you actually store and represent this as those
> arbitrary-precision integers? Every character of every string has to
> be a multiprecision integer?
Yes, although feel free to optimize. Th
Anyone here any experience with the rpy2 package? I am having trouble
getting it to install, and I have posted to the rpy mailing list, put
a question on SO, and even emailed the author, but I have received no
replies. Before I post details I wanted to see if anyone here can
possibly help me.
--
h
On Wed, Jul 19, 2017 at 10:13 PM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> On Wed, Jul 19, 2017 at 7:53 PM, Marko Rauhamaa wrote:
>>> Here's a proposal:
>>>
>>>* introduce a building (predefined) class Text
>>>
>>>* conceptually, a Text object is a sequence of "real" characters
>>>
>
Ganesh Pal wrote:
> On Tue, Jul 18, 2017 at 11:02 PM, Dan Strohl wrote:
>
>>
>> Like this:
>>
>> Def test_this(self):
>> For i in range(10):
>> with self.subTest('test number %s) % i):
>> self.assertTrue(I <= 5)
>>
>> With the subTest() method, if anything within that sub
Chris Angelico :
> On Wed, Jul 19, 2017 at 7:53 PM, Marko Rauhamaa wrote:
>> Here's a proposal:
>>
>>* introduce a building (predefined) class Text
>>
>>* conceptually, a Text object is a sequence of "real" characters
>>
>>* you can access each "real" character by its position in O(1)
On Wed, Jul 19, 2017 at 7:53 PM, Marko Rauhamaa wrote:
> Here's a proposal:
>
>* introduce a building (predefined) class Text
>
>* conceptually, a Text object is a sequence of "real" characters
>
>* you can access each "real" character by its position in O(1)
>
>* the "real" charac
On 19/07/17 09:17, Steven D'Aprano wrote:
On Tue, 18 Jul 2017 16:37:37 +0100, Rhodri James wrote:
(For the record, one of my grandmothers would have been baffled by this
conversation, and the other one would have had definite opinions on
whether accents were distinct characters or not, followed
>
> Yes. Just assert each thing as it needs asserting.
>
>
Asserting each sub test will fail the entire test, I want the to pass
the test if any the sub test passes. If the sub test fail try all cases
and fail for the last one.
Example :
def test_this(self):
if Sub_test_1():
#p
Chris Angelico :
> To be quite honest, I wouldn't care about that possibility. If I could
> design regex semantics purely from an idealistic POV, I would say that
> [xyzã], regardless of its encoding, will match any of the four
> characters "x", "y", "z", "ã".
>
> Earlier I posted a suggestion tha
On Tue, 18 Jul 2017 10:11:39 -0400, Random832 wrote:
> On Fri, Jul 14, 2017, at 04:15, Marko Rauhamaa wrote:
>> Consider, for example, a Python source code
>> editor where you want to limit the length of the line based on the
>> number of characters more typically than based on the number of pixe
On Tue, 18 Jul 2017 16:37:37 +0100, Rhodri James wrote:
> (For the record, one of my grandmothers would have been baffled by this
> conversation, and the other one would have had definite opinions on
> whether accents were distinct characters or not, followed by a
> digression into whether "ŵ" and
Gregory Ewing :
> Marko Rauhamaa wrote:
>> * a final "v" receives a superfluous "e" ("love")
>
> It's not superfluous there, it's preventing "love" from looking like
> it should rhyme with "of".
I'm pretty sure that wasn't the original motivation. If I had to guess,
the reason was the possible v
Gregory Ewing :
> Marko Rauhamaa wrote:
>>> * the final consonant of a single-syllable word is doubled only if the
>>> consonant is "k", "l" or "s" ("kick", "kill", "kiss")
>>
>> ... or "f" ("stiff") or "z" ("buzz")
>
> or sometimes "r" ("burr"), or "t" ("butt").
Those are exceptions.
The orto
Marko Rauhamaa wrote:
For all we know, someone somewhere might be cooking up a language that
depends on "q̈".
It makes perfectly good sense to me. It's the second derivative
of q with respect to time.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Marko Rauhamaa wrote:
* "v" is never doubled ("shovel")
Except for all the words that Grant listed before.
* a final "v" receives a superfluous "e" ("love")
It's not superfluous there, it's preventing "love" from looking like
it should rhyme with "of". (Of course you just have to know th
On Wed, Jul 19, 2017 at 4:49 PM, Steven D'Aprano wrote:
> The *really* tricky part is if you receive a string from the user
> intended as a regular expression. If they provide
>
> [xyzã]
>
> as part of a regex, and you receive ã in denormalized form
>
> U+0061 LATIN SMALL LETTER A + U+0303 COMBINI
Marko Rauhamaa wrote:
* the final consonant of a single-syllable word is doubled only if the
consonant is "k", "l" or "s" ("kick", "kill", "kiss")
... or "f" ("stiff") or "z" ("buzz")
or sometimes "r" ("burr"), or "t" ("butt").
--
Greg
--
https://mail.python.org/mailman/listinfo/python-lis
Grant Edwards wrote:
vacuum, continuum, squush, fortuuned
Fortuuned? Where did you find that?
Google gives me a bizarre set of results, none of which
appear to be an English dictionary definition.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Jul 18, 2017 at 11:02 PM, Dan Strohl wrote:
>
> Like this:
>
> Def test_this(self):
> For i in range(10):
> with self.subTest('test number %s) % i):
> self.assertTrue(I <= 5)
>
> With the subTest() method, if anything within that subTest fails, it won't
> stop the
On Wed, 19 Jul 2017 17:51:49 +1200, Gregory Ewing wrote:
> Chris Angelico wrote:
>> Once you NFC or NFD normalize both strings, identical strings will
>> generally have identical codepoints... You should then be able to use
>> normal regular expressions to match correctly.
>
> Except that if you
58 matches
Mail list logo