Mikhail V writes:
> On Mon, May 21, 2018 at 1:41 PM, Chris Lindsay via Python-list
> wrote:
>
>> If a block of static data is large enough to start to be ugly, a common
>> approach is to load the data from some other file, in a language which is
>>
Peter Otten <__pete...@web.de> writes:
> Gene Heskett wrote:
>
>> This biggest single thing wrong with any of those old scsi interfaces is
>> the bus's 5 volt isolation diode, the designer speced a shotkey(sp)
>> diode, and some damned bean counter saw the price diff and changed it to
>
> Is this
Peter Otten <__pete...@web.de> writes:
> Grant Edwards wrote:
>
>> On 2018-06-18, Joe Pfeiffer wrote:
>>> Peter Otten <__pete...@web.de> writes:
>>>
>>>> Gene Heskett wrote:
>>>>
>>>>> This biggest single thing wron
I notice a correlation: the less people have interacted with Bart, the
more tolerant they are.
He once went on for *weeks* about C's (yes, this was in c.l.c) failure
to have what he regards as a "proper" for-loop.
--
https://mail.python.org/mailman/listinfo/python-list
Mikhail V writes:
> [Steven D'Aprano]
>
>> (The same applies to Unix/Linux systems too, of course.) But while you're
>> using Python to manipulate files, you should use Python rules, and that
>> is "always use forward slashes".
>>
>> Is that reasonable?
>>
>> Under what circumstances would a
Steven D'Aprano writes:
> On Mon, 26 Mar 2018 02:37:44 +0100, bartc wrote:
>
>> If I instead initialise C using 'C = int("288712...")', then timings
>> increase as follows:
>
> Given that the original number given had 397 digits and has a bit length
> of
ast writes:
> Hi
>
> I found this way to put a large number in
> a variable.
>
> C = int(
> "28871482380507712126714295971303939919776094592797"
> "22700926516024197432303799152733116328983144639225"
> "94197780311092934965557841894944174093380561511397"
>
bartc <b...@freeuk.com> writes:
> On 25/03/2018 15:53, Joe Pfeiffer wrote:
>> ast <n...@gmail.com> writes:
>
>>> C = int(
>>> "28871482380507712126714295971303939919776094592797"
>>> "22700926516024197432303799152733116328983
"Avi Gross" writes:
> SYNOPSIS: One way to solve math puzzle by brute force. (message sent earlier
> disappeared)
>
>
>
> Quick note. Jack started by asking why python does not like decimal
> numbers with leading zeroes. When asked to explain, he said he was
> trying to solve word problems
jf...@ms4.hinet.net writes:
> MRAB at 2018/12/8 UTC+8 AM10:04:51 wrote:
>> Before Python 3, a leading 0 in an integer literal would indicate an
>> octal (base 8) number.
>
> So, the reason is historical.
>
>> The old form is now invalid in order to reduce the chance of bugs.
>
> I encounter this
u...@speedy.net writes:
> There are more integers than odd numbers, and more odd numbers than prime
> numbers. An infinite set may be a subset of another infinite set although
> they may both have the same cardinality. Or in other words, the number of
> elements in each set is not equal. One has
songbird writes:
> Chris Angelico wrote:
>> On Thu, Feb 14, 2019 at 7:12 AM Test Bot wrote:
>>>
>>> This definition of NaN is much better in mentally visualizing all the so
>>> called bizarreness of IEEE. This also makes intuitive that no 2 NaN will be
>>> equal just as no 2 infinities would be
ast writes:
> Hello
>
float('Nan') == float('Nan')
> False
>
> Why ?
>
> Regards
Others have given the real answer -- IEEE says so, and the people who
wrote the standard are smarter than me. All the same, this is my take
on the reason for it: NaN is specifically a representation for
ast writes:
> Le 13/02/2019 à 14:21, ast a écrit :
>> Hello
>>
>> >>> float('Nan') == float('Nan')
>> False
>>
>> Why ?
>>
>> Regards
>>
>
> Thank you for answers.
>
> If you wonder how I was trapped with it, here
> is the failing program.
>
>
> r = float('Nan')
>
> while r==float('Nan'):
>
Chris Angelico writes:
>
> Or even better, use None instead of nan. There's nothing in Python
> says you have to (ab)use a floating-point value as a signal. Or use
> "while True" and add a break if the exception isn't thrown.
Good point.
--
https://mail.python.org/mailman/listinfo/python-list
Joel Goldstick writes:
> On Wed, May 29, 2019 at 1:17 AM Sri Tharun wrote:
>>
>> Problem not resolved.Yet
>>
>> On Wed 29 May, 2019, 6:39 AM Tharun, wrote:
>>
>> >
>> > >>> sudo apt-get update
>> >
>> > File "", line 1
>> >
>> > sudo apt-get update
>> >^
>> > SyntaxError:
Chris Green writes:
> Stefan Ram wrote:
>> Chris Green writes:I can't find the documentation for
>> >read(). It's not a built-in function and it's not documented with
>> >(for example) the file type object sys.stdin.
>>
>> |read() (asyncio.StreamReader method), 894
>> |read()
Stephane Tougard writes:
> On 2020-09-27, Stefan Ram wrote:
>>>Is there any other instruction to end a if than pass and ensure Emacs
>>>does not break the indentation during a copy paste or an indent-region ?
>>
>> We usually do not wish to tie our code to a defective editor.
>> I use vi,
"Peter J. Holzer" writes:
> On 2020-06-24 15:33:16 -0600, Joe Pfeiffer wrote:
>> One other note -- while you may want various good-looking fonts with
>> ligatures in other domains, for writing code a monospace font with no
>> ligatures lets you see exactl
One other note -- while you may want various good-looking fonts with
ligatures in other domains, for writing code a monospace font with no
ligatures lets you see exactly what's there and saves a host of
problems. My personal favorite for these purposes is called "Terminus
Regular", but which
Jeff Linahan writes:
>
> See attached image. Would be nice if it printed "SyntaxError: unbalanced
> parens" as it can difficult to see the problem if code like this is run in
> an environment that only prints the problematic line, which in this case
> the compiler is confused and one line off.
Bischoop writes:
> On 2020-12-17, Dennis Lee Bieber wrote:
>>>
>>
>> The main concern is that you are using a RECURSIVE call. It is much
>> better for such input checking to use an ITERATIVE (loop) scheme.
>>
>> def marriage():
>> #loop forever
>> while True:
Bischoop writes:
> I've function asking question and comparing it, if is not matching 'yes'
> it does call itself to ask question again. The problem is that when
> function is called second time it returns old value or with additional
> else statement it returns none.
>
> Code:
Bischoop writes:
> On 2020-12-12, Joe Pfeiffer wrote:
>> Bischoop writes:
>>
>>> I've function asking question and comparing it, if is not matching 'yes'
>>> it does call itself to ask question again. The problem is that when
>>> function
Grant Edwards writes:
> On 2020-12-18, Joe Pfeiffer wrote:
>
>> Recursion has very limited application, but where it's the right
>> tool it's invaluable (top-down parsers, some graph algorithms...).
>> We teach it primarily because by the time a student has a good
&
Mr Flibble writes:
> Python is slow and significant whitespace is patently absurd.
Why am I not surprised to learn your "fast" implementation turns out to
be something other than python?
--
https://mail.python.org/mailman/listinfo/python-list
Skip Montanaro writes:
>>
>> Machine language is so much simpler, and you can code with just a hexpad.
>>
>
> Pshaa... All you need are front panel switches. ;-) (Yes, I had a professor
> who required is to 'key' in our programs on the front panel, of a rack
> mounted PDP-11 as I recall.
It's not a bug, it's a design choice you are disagreeing with: managing
indentation is your job, not the interpreter's. For anything other than
an absolutely trivial three-line script, I write in an editor that does
a good job helping me manage indentation (in my case, emacs in Python
mode).
Ethan Furman writes:
> On 2/24/21 1:54 PM, 2qdxy4rzwzuui...@potatochowder.com wrote:
>> Ethan Furman wrote:
>
>>> I didn't say it was a good example. ;-) Hopefully it gets the idea across.
>> Ditto. ;-)
>> IMO, the whole idea of "my program has two options, and the user has
>> to
>> specify
Ethan Furman writes:
> I'm looking for a name for a group of options that, when one is specified,
> all of them must be specified.
I don't fully understand the question (yes, I read the part I snipped).
Why is this not just a single option? Or is it hierarchical or
something so option 1
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> Alan Gauld writes:
>>OK, That's a useful perspective that is at least consistent.
>>Unfortunately it's not how beginners perceive it
> ...
>
> Beginners perceive it the way it is explained to them by
> their teacher.
My life as a professor
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>>can be misleading, because the "..." part can still contain
>>"break", "raise", "continue", and "return" statement. So one
>>better should always be on the watch when reading source code
>>of a language
2qdxy4rzwzuui...@potatochowder.com writes:
> On 2021-09-10 at 15:08:19 -0600,
> Joe Pfeiffer wrote:
>
>> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>
>> > The existence of statements like "break" renders
>> > proof techniques for loops
Hope Rouselle writes:
> Christian Gollwitzer writes:
>>
>> I believe it is not commutativity, but associativity, that is
>> violated.
>
> Shall we take this seriously? (I will disagree, but that doesn't mean I
> am not grateful for your post. Quite the contary.) It in general
> violates
Eli the Bearded <*@eli.users.panix.com> writes:
> In comp.lang.python, Michael F. Stemper wrote:
>> I've heard of JSON, but never done anything with it.
>
> You probably have used it inadvertantly on a regular basis over the
> past few years. Websites live on it.
If the user has any interaction
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> - S expressions (i.e., LISP notation)
If you're looking at hierarchical data and you don't have some good
reason to use something else, this is very likely to be your simplest
option.
--
https://mail.python.org/mailman/listinfo/python-list
Daniel Eduardo Almeida Correa writes:
> Hello, I'm trying to use the machine library in python 3.10 version, but I
> can't import it with the pip install machine, could you tell me a way to
> solve it or a python version compatible with the library? Thank you a lot
> for your answer.
The
Cecil Westerhof writes:
> In C when you declare a variable static in a function, the variable
> retains its value between function calls.
> The first time the function is called it has the default value (0 for
> an int).
> But when the function changes the value in a call (for example to 43),
>
Jon Ribbens writes:
> On 2022-10-12, Michael F. Stemper wrote:
>> On 12/10/2022 07.20, Chris Green wrote:
>>> ... and rm will just about always be in /usr/bin.
>>
>> On two different versions of Ubuntu, it's in /bin.
>
> It will almost always be in /bin in any Unix or Unix-like system,
>
Cameron Simpson writes:
> On 12Oct2022 20:54, Jon Ribbens wrote:
>>On 2022-10-12, Jon Ribbens wrote:
>>> On 2022-10-12, Joe Pfeiffer wrote:
>>>> Jon Ribbens writes:
>>>>> on Amazon Linux:
>>>>>
>>>>> $
Sohail Ahmad writes:
> kindly please help me about issues
> SyntaxError: multiple statements found while compiling a single statement
> how to solve this issues
Please post the code that got the error. Preferably several lines
before the actual error, and the line with the error itself.
--
41 matches
Mail list logo