Thomas Jollans writes:
> On 2017-10-13 11:07, Vincent Vande Vyvre wrote:
>> Le 13/10/17 à 09:23, Chris Angelico a écrit :
>>> On Fri, Oct 13, 2017 at 4:46 PM, Vincent Vande Vyvre
> ...
> If you have custom C code, it's likely that there is a memory management
> problem there. It's not unusual for
On Sat, Oct 14, 2017 at 2:46 PM, Steve D'Aprano
wrote:
> On Fri, 13 Oct 2017 09:47 pm, Marko Rauhamaa wrote:
>
>> "Peter J. Holzer" :
>>
>>> On 2017-10-13 05:28, Gregory Ewing wrote:
Not only does "byte" not always mean "8 bits", but
"char" isn't always short for "character"...
>>>
>>>
On Fri, 13 Oct 2017 09:47 pm, Marko Rauhamaa wrote:
> "Peter J. Holzer" :
>
>> On 2017-10-13 05:28, Gregory Ewing wrote:
>>> Not only does "byte" not always mean "8 bits", but
>>> "char" isn't always short for "character"...
>>
>> True.
>
> Well, it does, in my universe. That was cast in stone
On 2017-10-14, Gregory Ewing wrote:
>
>> I doubt that either process is in widespread usage any longer as
>> most manufacturers no incorporate a way to update the firmware of a
>> device
>
> Magnetic core technology died out long before that, due to
> inability to build machines that simulated arm
On Sat, 14 Oct 2017 07:04 am, Peter J. Holzer wrote:
> On 2017-10-13 15:28, Steve D'Aprano wrote:
>> On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
It's just a technique, like greying out certain menu options - clicking
them will do nothing, but you won't get an error message and y
On Sat, 14 Oct 2017 01:51 am, Chris Angelico wrote:
> On Sat, Oct 14, 2017 at 1:32 AM, Steve D'Aprano
> wrote:
>> It seems to me that you're not talking about ROM at all, but ordinary RAM.
>> Then what do you mean by "read only"? A block of memory with a flag that
>> says "unprivileged processes
On Sat, 14 Oct 2017 07:15 am, Peter J. Holzer wrote:
> On 2017-10-13 15:11, alister wrote:
>> On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote:
>>> Steve D'Aprano wrote:
I wasn't questioning where the data came from, but how the compiler can
write to READ ONLY MEMORY which might
On 2017-10-13 23:27, Irv Kalb wrote:
One of the colleges where I teach has just moved from Python 2 to Python 3. I am in
the process of converting my beginning Python class from Python 2 to Python 3.
Everything has gone smoothly, until I just tried to convert some code that imports
and uses
On Thursday, July 27, 2017 at 9:01:17 PM UTC+10, Case Solution & Analysis wrote:
> Case Solution and Analysis of Bratwurst, Beer and Business: Planning for
> Growth at Wurstküche by Thomas Knapp, Jacqueline Orr is available at a lowest
> price, send email to casesolutionscentre(at)gmail(dot)com i
alister wrote:
in the past for large quantitys the data in a ROM chip was part of the
chip etching mask
I know, I'm considering the masking process to be a kind of
write operation.
The Apollo lunar lander used a magnetic core store that was hard coded at
the time it was "Woven"
I doubt that
Steve D'Aprano wrote:
For example, pressing delete when there is no text to delete should just
silently do nothing.
That's really just a matter of deciding what should count as
an error and what shouldn't. You've decided that "pressing
Delete when there's nothing to delete does nothing" is a
re
On 14/10/17 00:27, Irv Kalb wrote:
> One of the colleges where I teach has just moved from Python 2 to Python 3.
> I am in the process of converting my beginning Python class from Python 2 to
> Python 3. Everything has gone smoothly, until I just tried to convert some
> code that imports and u
Chris Angelico writes:
> On Sat, Oct 14, 2017 at 8:42 AM, Ben Bacarisse wrote:
>> Chris Angelico writes:
>>
>>> On Fri, Oct 13, 2017 at 10:14 AM, Ben Bacarisse
>>> wrote:
Chris Angelico writes:
> I abbreviated that down to nothing, but since you ask, here's a really
> REALLY sim
On Fri, Oct 13, 2017 at 5:27 PM, Irv Kalb wrote:
> I've looked at the Python 3.6 documentation for urllib, and I see that
> certain calls have been changed and others have been eliminated. But my eyes
> glaze over trying to figure out what to use instead.
>
> My question is: Is there a simple
One of the colleges where I teach has just moved from Python 2 to Python 3. I
am in the process of converting my beginning Python class from Python 2 to
Python 3. Everything has gone smoothly, until I just tried to convert some
code that imports and uses urllib.urlOpen to fetch data through an
On Thursday, October 12, 2017 at 9:20:11 PM UTC-7, Frustrated learner wrote:
> Hello,
>
> I have a flask based application which i am able to run locally.
>
> $ python swagger_server/app.py
> * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
>
> I am trying to port this over to aws. I h
On Sat, Oct 14, 2017 at 9:02 AM, Grant Edwards
wrote:
> On 2017-10-13, Chris Angelico wrote:
>
> [regarding PHP vs Python capable web-hosting services]
>
>> Thing is, that's exactly the same for both languages these days. You
>> can get cheap (even zero-dollar) hosting that's preconfigured to be
On 2017-10-13, Chris Angelico wrote:
[regarding PHP vs Python capable web-hosting services]
> Thing is, that's exactly the same for both languages these days. You
> can get cheap (even zero-dollar) hosting that's preconfigured to be
> able to support either. There USED to be a difference, and ev
On Sat, Oct 14, 2017 at 8:42 AM, Ben Bacarisse wrote:
> Chris Angelico writes:
>
>> On Fri, Oct 13, 2017 at 10:14 AM, Ben Bacarisse wrote:
>>> Chris Angelico writes:
I abbreviated that down to nothing, but since you ask, here's a really
REALLY simple run-down of how to use Heroku:
>>>
Chris Angelico writes:
> On Fri, Oct 13, 2017 at 10:14 AM, Ben Bacarisse wrote:
>> Chris Angelico writes:
>>> I abbreviated that down to nothing, but since you ask, here's a really
>>> REALLY simple run-down of how to use Heroku:
>>
>> I think I see what you mean now. You meant no configuratio
Any takers?
--
https://mail.python.org/mailman/listinfo/python-list
On 13/10/2017 15:39, Steve D'Aprano wrote:
On Fri, 13 Oct 2017 11:54 pm, Gregory Ewing wrote:
Neil Cerutti wrote:
I can tell at a glance if a parameter is expected to be
modifiable just by looking at the function signature.
The question is why doesn't anyone feel the need to be
able to do th
On 2017-10-13 15:11, alister wrote:
> On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote:
>> Steve D'Aprano wrote:
>>> I wasn't questioning where the data came from, but how the compiler can
>>> write to READ ONLY MEMORY which might not even be in the same continent
>>> as the compiler that g
On Sat, Oct 14, 2017 at 6:32 AM, Peter J. Holzer wrote:
> On 2017-10-13 14:51, Chris Angelico wrote:
>> On Sat, Oct 14, 2017 at 1:32 AM, Steve D'Aprano
>> wrote:
>>> It seems to me that you're not talking about ROM at all, but ordinary RAM.
>>> Then what do you mean by "read only"? A block of mem
On 2017-10-13 15:28, Steve D'Aprano wrote:
> On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
>>> It's just a technique, like greying out certain menu options - clicking
>>> them will do nothing, but you won't get an error message and you don't want
>>> to allow them anyway, risking more seriou
On 2017-10-13 14:51, Chris Angelico wrote:
> On Sat, Oct 14, 2017 at 1:32 AM, Steve D'Aprano
> wrote:
>> It seems to me that you're not talking about ROM at all, but ordinary RAM.
>> Then what do you mean by "read only"? A block of memory with a flag that
>> says "unprivileged processes are prohib
On 2017-10-13, Steve D'Aprano wrote:
> On Fri, 13 Oct 2017 11:54 pm, Gregory Ewing wrote:
>
>> Neil Cerutti wrote:
>>> I can tell at a glance if a parameter is expected to be
>>> modifiable just by looking at the function signature.
>>
>> The question is why doesn't anyone feel the need to be
>>
On Sat, Oct 14, 2017, Gregory Ewing wrote:
>
Message: 5
>Date: Sat, 14 Oct 2017 01:54:49 +1300
>From: Gregory Ewing
>To: python-list@python.org
>Subject: Re: Lies in education [was Re: The "loop and a half"]
>Message-ID:
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>Neil Cerutti
Hi Roger,
Unfortunately you seem to have messed up the quoting (*and* the subject line,
and the threading) for this post. The perils of replying to digests.
I'll try to repair the worst of the misquoted text as I go, but if I
accidentally attribute something I said to you, well, that's only becau
alister :
> On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote:
>> I thought it would be fairly obvious that by "put it in read-only
>> memory" I meant "arrange for it to be in a location that is read-only
>> at run time". Obviously it can't be read-only at *compile* time, just
>> as a physic
On 13/10/2017 16:33, Steve D'Aprano wrote:
On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
For a novice, seeing 'Segmentation fault (core dumped)' is better?
Better than silently doing nothing? YES. Absolutely it is.
Chris, you forget that for Bart, his user-base is only himself. If he
The answer is:
The dict returns list - my mistake obviously.
I think list.pop(0) is better for sanity than list[0]:
Pos= [k,v for ...].pop(0)
On Oct 13, 2017 00:23, "Andrew Z" wrote:
> Hello,
> pos = {"CLown":10,"BArbie":20}
> I want to return integer (10) for the keyword that starts with
Thank you!!!
What finally worked.> py -m pip install pyperclip
-Original Message-
From: Terry Reedy [mailto:tjre...@udel.edu]
Sent: Wednesday, October 11, 2017 1:00 PM
To: python-list@python.org
Subject: Re: Unable to run pip in Windows 10
On 10/11/2017 10:46 AM, Michael Cuddehe wro
On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
>> For a novice, seeing 'Segmentation fault (core dumped)' is better?
>
> Better than silently doing nothing? YES. Absolutely it is.
Chris, you forget that for Bart, his user-base is only himself. If he programs
his home-made system to silently
On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
>> It's just a technique, like greying out certain menu options - clicking
>> them will do nothing, but you won't get an error message and you don't want
>> to allow them anyway, risking more serious consequences.
>
> Even there, you often CAN g
We are pleased to announce the third batch of cut videos for
EuroPython 2017.
To see the new videos, please head over to our EuroPython YouTube
channel and select the “EuroPython 2017″ playlist. The new videos
start at entry 63 in the playlist.
* EuroPython 2017 Videos *
On 13/10/2017 15:59, Julien Salort wrote:
Le 12/10/2017 à 17:57, bartc a écrit :
With a const struct, you are stopped from directly modifying elements,
but if an element is a pointer, nothing stops you writing to what the
pointer points to, unless that has a const target too. And then you've
On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote:
> Steve D'Aprano wrote:
>> I wasn't questioning where the data came from, but how the compiler can
>> write to READ ONLY MEMORY which might not even be in the same continent
>> as the compiler that generated the code.
>
> I thought it would
Le 12/10/2017 à 17:57, bartc a écrit :
With a const struct, you are stopped from directly modifying elements,
but if an element is a pointer, nothing stops you writing to what the
pointer points to, unless that has a const target too. And then you've
going to have problems doing normal updates
On Sat, Oct 14, 2017 at 1:32 AM, Steve D'Aprano
wrote:
> It seems to me that you're not talking about ROM at all, but ordinary RAM.
> Then what do you mean by "read only"? A block of memory with a flag that
> says "unprivileged processes are prohibited from writing here"?
>
> (That's also not a rh
On Fri, 13 Oct 2017 11:54 pm, Gregory Ewing wrote:
> Neil Cerutti wrote:
>> I can tell at a glance if a parameter is expected to be
>> modifiable just by looking at the function signature.
>
> The question is why doesn't anyone feel the need to be
> able to do that for Python functions? Whether a
On Fri, 13 Oct 2017 11:48 pm, Gregory Ewing wrote:
> Steve D'Aprano wrote:
>> I wasn't questioning where the data came from, but how the compiler can
>> write to READ ONLY MEMORY which might not even be in the same continent as
>> the compiler that generated the code.
>
> I thought it would be fa
bartc :
> But what about the poor user reading the code? Or can that now only be
> done with the aid or a browser that analyses 100,000 lines and applies
> that same algorithm?
>
> We mustn't forget the person writing the code, who may have a certain
> type in mind for X, but their (I nearly said
On Sat, Oct 14, 2017 at 12:51 AM, bartc wrote:
> On 13/10/2017 14:16, Chris Angelico wrote:
>>
>> On Sat, Oct 14, 2017 at 12:00 AM, bartc wrote:
>>>
>>> Even if data is actually in write-protected memory, attempts to write to
>>> it
>>> will cause a crash. On my home-made system, they just did no
On 13/10/2017 14:22, Marko Rauhamaa wrote:
BTW, the original reason for C requiring declarations in the first place
wasn't readability. Rather, it was to make compilation possible in the
first place. It is interesting that C++ and Java have taken steps to
remove such information where the compil
Paul Moore :
> To put it another way, in C const is a property of the variable being
> declared, not the value assigned to it. In Python, variables aren't
> declared, and constness is an inherent property of the value (or its
> type). One interesting question which this does raise is whether
> the
On 13 October 2017 at 13:54, Gregory Ewing wrote:
> Neil Cerutti wrote:
>>
>> I can tell at a glance if a parameter is expected to be
>> modifiable just by looking at the function signature.
>
>
> The question is why doesn't anyone feel the need to be
> able to do that for Python functions? Whethe
On 13/10/2017 14:16, Chris Angelico wrote:
On Sat, Oct 14, 2017 at 12:00 AM, bartc wrote:
Even if data is actually in write-protected memory, attempts to write to it
will cause a crash. On my home-made system, they just did nothing. Much more
graceful.
The novice thinks his job is to stop the
Gregory Ewing :
> Neil Cerutti wrote:
>> I can tell at a glance if a parameter is expected to be modifiable
>> just by looking at the function signature.
>
> The question is why doesn't anyone feel the need to be able to do that
> for Python functions? Whether a function modifies things passed to
On Sat, Oct 14, 2017 at 12:00 AM, bartc wrote:
> Even if data is actually in write-protected memory, attempts to write to it
> will cause a crash. On my home-made system, they just did nothing. Much more
> graceful.
The novice thinks his job is to stop the program from crashing. The
expert knows
On 13/10/2017 12:49, Peter J. Holzer wrote:
On 2017-10-13 10:37, Steve D'Aprano wrote:
or written by a dedicated hardware device:
https://en.wikipedia.org/wiki/Programmable_read-only_memory
And in this case there will be a tool which will read the object file
and send the contents of the r
Neil Cerutti wrote:
I can tell at a glance if a parameter is expected to be
modifiable just by looking at the function signature.
The question is why doesn't anyone feel the need to be
able to do that for Python functions? Whether a function
modifies things passed to it is just as important to
Steve D'Aprano wrote:
I wasn't questioning where the data came from, but how the compiler can write
to READ ONLY MEMORY which might not even be in the same continent as the
compiler that generated the code.
I thought it would be fairly obvious that by "put it in
read-only memory" I meant "arran
On 13 October 2017 at 12:18, Vincent Vande Vyvre
wrote:
> Le 13/10/17 à 12:39, Paul Moore a écrit :
>>
>> As a specific suggestion, I assume the name of the created file is a
>> string object constructed in the C extension code, somehow. The fact
>> that you're getting the segfault with some uses
Le 13/10/17 à 12:39, Paul Moore a écrit :
As a specific suggestion, I assume the name of the created file is a
string object constructed in the C extension code, somehow. The fact
that you're getting the segfault with some uses of that string
(specifically, passing it to %-formatting) suggests th
On 2017-10-13 10:37, Steve D'Aprano wrote:
> On Fri, 13 Oct 2017 05:16 pm, Gregory Ewing wrote:
>> Steve D'Aprano wrote:
>>> On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote:
>>>
If the compiler can tell where p is initially pointing, it could
put the pointer in read-only memory.
>>>
>>
Marko Rauhamaa :
> bartc :
>> 'const' tries to do too many things, most of them poorly, although it
>> does a very good job at adding clutter.
>
> +1
However, I do my best to honor "const" since it's there. I'm even more
Catholic than the Pope and declare:
int main(int argc, const char *const
"Peter J. Holzer" :
> On 2017-10-13 05:28, Gregory Ewing wrote:
>> Not only does "byte" not always mean "8 bits", but
>> "char" isn't always short for "character"...
>
> True.
Well, it does, in my universe. That was cast in stone 10**-32 seconds
after the Big Bang.
Marko
--
https://mail.pyt
bartc :
> 'const' tries to do too many things, most of them poorly, although it
> does a very good job at adding clutter.
+1
Marko
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 13 Oct 2017 05:16 pm, Gregory Ewing wrote:
> Steve D'Aprano wrote:
>> On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote:
>>
>>>If the compiler can tell where p is initially pointing, it could
>>>put the pointer in read-only memory.
>>
>> If it's read-only, how can the compiler write to i
As a specific suggestion, I assume the name of the created file is a
string object constructed in the C extension code, somehow. The fact
that you're getting the segfault with some uses of that string
(specifically, passing it to %-formatting) suggests that there's a bug
in the C code that construc
On 13/10/2017 07:16, Gregory Ewing wrote:
Steve D'Aprano wrote:
On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote:
If the compiler can tell where p is initially pointing, it could
put the pointer in read-only memory.
If it's read-only, how can the compiler write to it?
(I come from the days
On 2017-10-13 11:07, Vincent Vande Vyvre wrote:
> Le 13/10/17 à 09:23, Chris Angelico a écrit :
>> On Fri, Oct 13, 2017 at 4:46 PM, Vincent Vande Vyvre
>> wrote:
>>> Simplified code:
>>>
>>> ---%<--
>>> ...
>>> ---%<--
On 2017-10-13 05:28, Gregory Ewing wrote:
> Grant Edwards wrote:
>> On 2017-10-13, Stefan Ram wrote:
>>> 1 byte
>>>
>>> addressable unit of data storage large enough to hold
>>> any member of the basic character set of the execution
>>> environment«
>>>
>>>ISO C standard
>
Le 13/10/17 à 09:23, Chris Angelico a écrit :
On Fri, Oct 13, 2017 at 4:46 PM, Vincent Vande Vyvre
wrote:
Simplified code:
---%<--
...
---%<--
If I place self.callback() at the end of the func process that doesn't
Andrew Z wrote:
> Hello,
> pos = {"CLown":10,"BArbie":20}
> I want to return integer (10) for the keyword that starts with "CL"
>
>
> cl_ = [v for k, v in pos.items() if k.startswith('CL')]
> cl_pos = cl_[0]
> if cl_pos > 0:
>
>blah..
>
>
> There are 2 issues with the above:
> a. ugly -
On Fri, Oct 13, 2017 at 4:46 PM, Vincent Vande Vyvre
wrote:
> Simplified code:
>
> ---%<--
> class Foo:
> tasks = []
> def process(self, *args):
> # process with the file
> # save result on disk with a new name
> self.out_file
Am 12.10.17 um 01:33 schrieb Chris Angelico:
Yeah. The trouble is that this is a really REALLY bad way to design
something. Have you seen a city that grew one house at a time, and had
streets added to service those houses? Not good.
I tend to disagree. Many European villages have been built th
Simplified code:
---%<--
class Foo:
tasks = []
def process(self, *args):
# process with the file
# save result on disk with a new name
self.out_filename.write(.)
def run_multitasks(self):
while self.tasks:
69 matches
Mail list logo