Found it!
Thanks again :-)
--
https://mail.python.org/mailman/listinfo/python-list
Hi Terry,
many thanks for your detailed explanation!
(I can't see how to 'reply' under your post...)
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, May 11, 2018 at 12:38 PM, Ian Kelly wrote:
> Would you also contend that generator functions are wrong because they
> pretend to be normal functions?
>
> def totally_not_a_generator(n):
> while True:
> if n % 2 == 0:
> n //= 2
> else:
> n = n * 3
On Fri, May 11, 2018 at 4:54 PM, Ian Kelly wrote:
> On Thu, May 10, 2018 at 11:45 PM, Steven D'Aprano
> wrote:
>> To be honest, I'm having trouble thinking of a good use-case for "while
>> True", now that we have infinite iterators. Most cases of
>>
>> while True:
>> x = get_item()
>>
On Fri, May 11, 2018 at 12:03 AM, Steven D'Aprano
wrote:
> On Thu, 10 May 2018 20:38:39 -0600, Ian Kelly wrote:
>
>> Would you also contend that generator functions are wrong because they
>> pretend to be normal functions?
>
> You're going to need to be more specific. In what way are they not norm
On Fri, May 11, 2018 at 12:04 PM, Bob van der Poel wrote:
> I agree with my freind Gene! And, if it is really necessary to retain
> octal, why not preface it with anything BUT a "0". I've been hit by this a
> few times in the past. I used lots of hex over the years, but don't recall
> ever using o
On Fri, May 11, 2018 at 4:39 PM, Ian Kelly wrote:
> On Mon, May 7, 2018 at 9:45 PM, Mikhail V wrote:
>> Benefits are easy to see: say I want a tuple of strings:
>>
>> data === T :
>> "foo bar"
>> "hello world"
>> "to be continued..."
>>
>> VS current:
>>
>> data = (
>> "foo bar" ,
On 5/11/2018 2:57 AM, Cuthbert Milligen wrote:
Hi Terry,
many thanks for your detailed explanation!
(I can't see how to 'reply' under your post...)
Followup to the list rather than reply to me, as you did, is the right
thing to do.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/li
Marko Rauhamaa wrote:
I was mildly amused when Python happily executed such code. "..." is a
valid expression and thus, a valid statement.
Fortunately, "?" still works for this!
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
I suggest adding a new builtin constant:
YouFeelLikeIt = True
Then all pseudo-infinite loops can be written
while YouFeelLikeIt:
...
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On 10/05/2018 19:51, Chris Angelico wrote:
YAGNI much? How often do you need a base-9 literal in your code??
You've obviously never programmed a Setun ternary computer:
https://en.wikipedia.org/wiki/Setun
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, May 11, 2018 at 7:10 PM, Gregory Ewing
wrote:
> I suggest adding a new builtin constant:
>
>YouFeelLikeIt = True
>
> Then all pseudo-infinite loops can be written
>
>while YouFeelLikeIt:
> ...
>
Personally, I prefer to use string literals.
while "you feel like it":
...
Chris Angelico wrote:
Octal makes a lot of sense in the right contexts. Allowing octal
literals is a Good Thing. And sticking letters into the middle of a
number doesn't make that much sense, so the leading-zero notation is a
decent choice.
Also it's easy to forget that octal was a big part of
Marko Rauhamaa wrote:
I think octal is a historical relic from a time when people weren't yet
comfortable with hexadecimal.
Octal made perfect sense for all PDP models up to the
PDP-10, which had word sizes that were a multiple of
3 bits.
It still partly made sense for the PDP-11, because its
Chris Angelico wrote:
What do you mean, "another bit"? Currently, the chmod command on my
system can manage nine primary bits (rwx for each of ugo), plus
setuid, setgid, and sticky.
I think the idea is that you could regroup those 4 groups
of 3 into 3 groups of 4, and get a nice mapping to hex.
Steven D'Aprano wrote:
n for binary
t for octal
i for trinary
o for duodecimal
and of course, x for hexadecimal.
And in format strings:
"c" for decimal
"a" for char
"r" for string
"w" for raw string
Looks fine to me. Who wants to write the PEP?
--
Greg
--
https://mail.python.org/mai
Steven D'Aprano wrote:
But that's not where plists came from, was it? As I understand it, the
plist data format was invented by Apple, and they called it a property
list.
The term "property list" can also refer to a data structure in Lisp:
https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node10
On 2018-05-10, Chris Angelico wrote:
> On Fri, May 11, 2018 at 5:04 AM, Jon Ribbens
> wrote:
>> This whole thread is reminding me PHP 2, which would magically treat
>> the second parameter of ChMod() as octal, because clearly if weak
>> typing is good then *no* typing must be best of all!
>>
>>
On Fri, 11 May 2018 21:55:17 +1200, Gregory Ewing wrote:
> Hex came into vogue in the DEC world with the VAX, which was both
> byte-addressed and had a hex-oriented instruction encoding.
Indeed. In 2018 when nearly all computers (aside from some DSPs) have
standardised on the same number of bit
On 11/05/2018 01:11, Chris Angelico wrote:
On Fri, May 11, 2018 at 8:43 AM, bartc wrote:
This is Wrong, and would have been just as obviously wrong in 1989.
Having spent many years programming in C and working on Unix, I
strongly disagree.
Using C is apt to give you a rather warped view of
On 10/05/2018 21:18, bartc wrote:
On 10/05/2018 19:51, Chris Angelico wrote:
On Fri, May 11, 2018 at 4:31 AM, bartc wrote:
2x100 (4) Binary
3x100 (9) Ternary
4x100 (16) Quaternary
5x100 (25) etc
6x100 (36)
7x100 (49)
8x100 (64) Octal
9x100 (81)
...
Regular password resets are always a good thing to do, but this time
we have a specific reason to ask you to consider taking the extra
time.
In December 2017, our ISP detected port scans originating from our
server and informed us about these. During the analysis, we found that
someone (or better:
bartc writes:
> On 11/05/2018 01:25, Marko Rauhamaa wrote:
>> Chris Angelico :
>>
>>> Octal makes a lot of sense in the right contexts.
>>
>> I think octal is a historical relic from a time when people weren't yet
>> comfortable with hexadecimal.
>
> It's a relic from when machines had word sizes
Chris Angelico :
> On Fri, May 11, 2018 at 7:10 PM, Gregory Ewing
> wrote:
>> I suggest adding a new builtin constant:
>>
>>YouFeelLikeIt = True
>>
>> Then all pseudo-infinite loops can be written
>>
>>while YouFeelLikeIt:
>> ...
>>
>
> Personally, I prefer to use string literals.
>
Ben Bacarisse :
> bartc writes:
>> On 11/05/2018 01:25, Marko Rauhamaa wrote:
>>> I think octal is a historical relic from a time when people weren't
>>> yet comfortable with hexadecimal.
>>
>> It's a relic from when machines had word sizes that were multiples of
>> three bits, or were divided up
On Fri, May 11, 2018 at 8:08 PM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>>
>> What do you mean, "another bit"? Currently, the chmod command on my
>> system can manage nine primary bits (rwx for each of ugo), plus
>> setuid, setgid, and sticky.
>
>
> I think the idea is that you could regroup
On Fri, May 11, 2018 at 9:09 PM, bartc wrote:
> On 11/05/2018 01:11, Chris Angelico wrote:
>>
>> On Fri, May 11, 2018 at 8:43 AM, bartc wrote:
>>>
>>> This is Wrong, and would have been just as obviously wrong in 1989.
>>
>>
>> Having spent many years programming in C and working on Unix, I
>> st
On Fri, May 11, 2018 at 1:06 AM, Chris Angelico wrote:
> On Fri, May 11, 2018 at 4:54 PM, Ian Kelly wrote:
>> On Thu, May 10, 2018 at 11:45 PM, Steven D'Aprano
>> wrote:
>>> To be honest, I'm having trouble thinking of a good use-case for "while
>>> True", now that we have infinite iterators. Mo
On Fri, May 11, 2018 at 1:01 AM, Chris Angelico wrote:
> On Fri, May 11, 2018 at 12:38 PM, Ian Kelly wrote:
>> Would you also contend that generator functions are wrong because they
>> pretend to be normal functions?
>>
>> def totally_not_a_generator(n):
>> while True:
>> if n % 2 ==
On Fri, May 11, 2018 at 11:28 PM, Ian Kelly wrote:
> You can get rid of the while loop:
>
> for x in iter(get_item, None):
> process(x)
>
> The reason I suggested the function I did is because the x in that
> case can't reasonably be turned into an iterator because the logic
> depends on the l
Chris Angelico :
> On Fri, May 11, 2018 at 8:08 PM, Gregory Ewing
> wrote:
>> I think the idea is that you could regroup those 4 groups of 3 into 3
>> groups of 4, and get a nice mapping to hex. If hex had been the
>> conventional way of writing binary numbers back then, Ken and Dennis
>> would p
On Fri, May 11, 2018 at 11:31 PM, Ian Kelly wrote:
> On Fri, May 11, 2018 at 1:01 AM, Chris Angelico wrote:
>> On Fri, May 11, 2018 at 12:38 PM, Ian Kelly wrote:
>>> Would you also contend that generator functions are wrong because they
>>> pretend to be normal functions?
>>>
>>> def totally_not
On 2018-05-11, Gene Heskett wrote:
> Computers haven't read a single 8 bit byte in years, some reading
> 128 or 256 bits in a single read cycle today.
Nonsense. All modern CPUs that I'm aware of still still support
single byte reads, and compilers still use those instructions when the
size of t
On 2018-05-11, Dennis Lee Bieber wrote:
> On Fri, 11 May 2018 01:55:58 +0100, bartc declaimed the
> following:
>
>>On 11/05/2018 01:25, Marko Rauhamaa wrote:
>>> Chris Angelico :
>>>
Octal makes a lot of sense in the right contexts.
>>>
>>> I think octal is a historical relic from a time w
On 2018-05-11, Steven D'Aprano wrote:
> On Fri, 11 May 2018 21:55:17 +1200, Gregory Ewing wrote:
>
>> Hex came into vogue in the DEC world with the VAX, which was both
>> byte-addressed and had a hex-oriented instruction encoding.
>
>
> [...] You had computers with 6, 9, or even 60 bits per byte
On Fri, May 11, 2018 at 7:40 AM, Chris Angelico wrote:
> So, yes, your function's name is outright lying. But there's nothing
> about it that is *pretending* to be a normal function. It IS a normal
> function.
The detail of whether it's a generator function affects the function's
execution and ma
I encountered the same issue with Python 3.4 on CentOS 7 when using only the
close_fds argument. Since I am passing a lot of dynamically obtained file
descriptors, using the pass_fds argument is impossible for my case. Setting
close_fds to False *but* also explicitly making the fds inheritable u
On Sat, May 12, 2018 at 1:03 AM, Ian Kelly wrote:
> On Fri, May 11, 2018 at 7:40 AM, Chris Angelico wrote:
>> So, yes, your function's name is outright lying. But there's nothing
>> about it that is *pretending* to be a normal function. It IS a normal
>> function.
>
> The detail of whether it's a
On 2018-05-11, Grant Edwards wrote:
> On 2018-05-11, Gene Heskett wrote:
>> Computers haven't read a single 8 bit byte in years, some reading
>> 128 or 256 bits in a single read cycle today.
>
> Nonsense. All modern CPUs that I'm aware of still still support
> single byte reads, and compilers st
On 11/05/2018 14:24, Chris Angelico wrote:
On Fri, May 11, 2018 at 9:09 PM, bartc wrote:
when 101'11010'000'B then ...
Try /that/ in hex /or/ octal.)
I've no idea what this is supposed to mean, or why you have groups of
three, five, and three. Looks like a possible bug to me. I'm sure
On Fri, May 11, 2018 at 12:19 AM, Steven D'Aprano
wrote:
> On Thu, 10 May 2018 23:23:33 -0600, Ian Kelly wrote:
>
>> On Thu, May 10, 2018 at 9:21 PM, Steven D'Aprano
>> wrote:
>>> On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote about proposed
>>> prefixes for octal:
>>>
Personally I woul
On Fri, May 11, 2018 at 10:35 AM, Ian Kelly wrote:
> On Fri, May 11, 2018 at 12:19 AM, Steven D'Aprano
> wrote:
>> On Thu, 10 May 2018 23:23:33 -0600, Ian Kelly wrote:
>>
>>> On Thu, May 10, 2018 at 9:21 PM, Steven D'Aprano
>>> wrote:
On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote abou
>
> And, if it is really necessary to retain
> octal, why not preface it with anything BUT a "0".
>
I believe "0o" offers some symmetry with the "0x" prefix used for hex
literals. (And "0b" for binary.) It's a bit unfortunate that zero and
capital "oh" are visually so similar. Not much to be done
On 5/11/2018 11:23 AM, pevo...@gmail.com wrote:
I encountered the same issue with Python 3.4 on CentOS 7 when using only the
close_fds argument. Since I am passing a lot of dynamically obtained file
descriptors, using the pass_fds argument is impossible for my case. Setting
close_fds to False
On Fri, May 11, 2018 at 9:12 AM, Ian Kelly wrote:
> On Thu, May 10, 2018 at 6:34 PM, Mikhail V wrote:
>> On Wed, May 9, 2018 at 6:25 AM, Steven D'Aprano
>> wrote:
>>> On Tue, 08 May 2018 23:16:23 +0300, Mikhail V wrote:
>>>
>>
but I propose Tab-separated elements.
>
> Then these are not ord
I have installed Python recently. Do I need to install PIP separately or this
would be part of default installation. When I run pip install <>, windows
complains that no such command exists
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, May 11, 2018 at 9:39 AM, Ian Kelly wrote:
> On Mon, May 7, 2018 at 9:45 PM, Mikhail V wrote:
>> *Example 1. Multi-line strings*
>>
>> data === S :
>> this is multi-line string
>> escape chars: same as in strings (\\, \\n, \\t ...) ,
>> but "no need to 'escape' quotes"
>
> My
On 2018-05-12 03:47, Sharan Basappa wrote:
I have installed Python recently. Do I need to install PIP separately or this would
be part of default installation. When I run pip install <>, windows complains
that no such command exists
That means that pip isn't on the Windows search path.
It mi
I see an issue while running ipython.
Can anyone help please.
D:\Users\sharanb>ipython notebook
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and
will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in the
futur
On Saturday, 12 May 2018 08:32:04 UTC+5:30, MRAB wrote:
> On 2018-05-12 03:47, Sharan Basappa wrote:
> > I have installed Python recently. Do I need to install PIP separately or
> > this would be part of default installation. When I run pip install <>,
> > windows complains that no such command
On Fri, 11 May 2018 16:56:09 +0100, bartc wrote:
> 0100, if not intended as octal, is
> an undetectable error in C and Python 2.
How fortunate then that Python 2 is history (soon to be ancient history)
and people can use Python 3 where that error of judgement has been
rectified.
--
Steve
-
On Fri, 11 May 2018 20:13:08 -0700, Sharan Basappa wrote:
> I see an issue while running ipython. Can anyone help please.
Is the error message not clear enough? It tells you what the problem is
("ipython notebook" is deprecated) and tells you how to fix it (use
"jupyter notebook" instead).
>
On Sat, 12 May 2018 02:26:05 +0300, Mikhail V wrote:
> it is just not a trivial task to find an optimal solution to this
We already have an optimal solution to this.
* It works with any editor, including simple ones.
* It is safe for transmit over email, or on web forums,
so long as you av
in 793617 20180511 072806 Steven D'Aprano
wrote:
>On Fri, 11 May 2018 07:20:36 +, Bob Martin wrote:
>
>> in 793605 20180511 044309 T Berger wrote:
>>>On Saturday, May 5, 2018 at 6:45:46 PM UTC-4, MRAB wrote:
>>>> On 2018-05-05 17:57, T Berger wrote:
>
54 matches
Mail list logo