Steve D'Aprano wrote:
I recall that the Pascal compiler had to do some clever behind the scenes
jiggery-pokery to get eof() to work, but that's what compilers are supposed
to do: make common tasks easy for the programmer.
Sometimes the jiggery-pokery worked, sometimes it didn't.
For example, th
Stefan Ram wrote:
> bartc writes:
>>Note that your reverse-indentation style is confusing!
>
> In Python, indentation can be significant.
>
> Sometimes, some lines in Python must be indented by 0.
Are there any editors that do not support a dedent operation?
In the interactive interpreter
On Thu, Oct 5, 2017 at 5:59 PM, Peter Otten <__pete...@web.de> wrote:
>> This dictates that Python code cannot be indented
>> in posts to differentiate it from the natural-language
>> body of the post. Therefore, it's rather the
>> natural-language body that has to be indented.
>
> That app
On 2017-10-05 06:24, Steve D'Aprano wrote:
> On Thu, 5 Oct 2017 02:14 pm, Stefan Ram wrote:
>
>> Chris Angelico writes:
>>> You can get through a lot of life believing that mass is conserved,
>>> but technically it is not, as can be proven.
>>
>> Well, in fact, it is conserved.
>
> It certainl
On 10/04/2017 05:08 PM, Steve D'Aprano wrote:
> pbip2? Never heard of it, and googling comes up with nothing relevant.
>
> Got a link?
Sorry it was a typo as Paul Moore said. pbzip2 is a parellelized
implementation of bzip2:
http://compression.ca/pbzip2/
> Why obviously?
Sorry again. I
On 2017-10-05 06:47, Steve D'Aprano wrote:
> On Thu, 5 Oct 2017 02:54 pm, Chris Angelico wrote:
>> (There are exceptions even to the longer form of the rule, but only a
>> handful. English isn't a tidy language.)
>
> Even with the longer version of the rule, there are so few applicable cases,
> an
Btw if anyone knows a better way to handle this sort of thing, I'm all
ears. Given my current implementation I could use any compression that
works with stdin/stdout as long as I could sort out the waiting on the
subprocess. In fact, bzip2 is probably more than I need...I've half used
it out of hab
On Thu, Oct 5, 2017 at 1:36 PM, Stefan Ram wrote:
> Steve D'Aprano writes:
>>If you were teaching people to drive a car, would you insist on teaching them
>>how to pull out and rebuild the engine before sitting them in the drivers
>>seat?
>
> If I would have to teach people to drive a car, I wo
On 10/05/2017 12:00 AM, Thomas Jollans wrote:
On 04/10/17 22:47, Fabien wrote:
On 10/04/2017 10:11 PM, Thomas Jollans wrote:
Be warned, pandas is part of the scientific python stack, which is
immensely powerful and popular, but it does have a distinctive style
that may appear cryptic if you're
On 05/10/2017 07:57, Gregory Ewing wrote:
Steve D'Aprano wrote:
I recall that the Pascal compiler had to do some clever behind the scenes
jiggery-pokery to get eof() to work, but that's what compilers are
supposed
to do: make common tasks easy for the programmer.
Sometimes the jiggery-pokery
On Thu, Oct 5, 2017 at 9:56 PM, bartc wrote:
> This doesn't make sense. For interactive use, you wouldn't bother testing
> for eof, as you'd be testing the eof status of the keyboard.
You mean the way heaps and heaps of Unix programs work, processing
until EOF of stdin? Yeah, totally makes no sen
Hello,
I'm trying to understand native namespaces. I'm currently using python
3.5 as packaged in debian 9. I've been following the instructions here:
https://packaging.python.org/guides/packaging-namespace-packages/#native-namespace-packages
Those instructions link to the following exam
r...@zedat.fu-berlin.de (Stefan Ram):
> Some of you are experts in Python, but are only
> half-educated when it comes to physics, C++ or other topics.
> I wish those persons would not broadcast their
> half-knowledge in the form of confident statements,
I don't wish that. That would only
bartc wrote:
Result? You can't just look at my 'any' class and see what fields it
uses. You can't even just look at the static source code. You have to
run the program to find out. And it might be different each time.
You can usually get a pretty good idea of what attributes a
class has by loo
On 05/10/2017 12:09, Chris Angelico wrote:
On Thu, Oct 5, 2017 at 9:56 PM, bartc wrote:
This doesn't make sense. For interactive use, you wouldn't bother testing
for eof, as you'd be testing the eof status of the keyboard.
You mean the way heaps and heaps of Unix programs work, processing
unt
On 05/10/2017 12:29, Gregory Ewing wrote:
bartc wrote:
Result? You can't just look at my 'any' class and see what fields it
uses. You can't even just look at the static source code. You have to
run the program to find out. And it might be different each time.
You can usually get a pretty good
On Wed, Oct 4, 2017 22:42 Stefan Ram (r...@zedat.fu-berlin.de) wrote:
>
Steve D'Aprano writes:
>>So, "bottom-up" in this case means: iterators should be
>>taught before for-loops.
>>Why?
>
> The syntax for is (from memory):
>
>for in :
>
> . As an example, I might show:
>
>for i in range( 3 )
On Thu, 5 Oct 2017 10:51 pm, bartc wrote:
> Am I allowed to say that it all seems a bit of a mess?
You may or may not be pleased to learn that there's a push to create a "record
like" or "struct like" datatype for Python 3.7 or 3.8, tentatively called
a "Data Class" for now.
The proposed syntax
Stefan Ram wrote:
> "ROGER GRAYDON CHRISTMAN" writes:
>>On Wed, Oct 4, 2017 22:42 Stefan Ram (r...@zedat.fu-berlin.de) wrote:
>>Steve D'Aprano writes:
So, "bottom-up" in this case means: iterators should be
taught before for-loops.
Why?
>>The easy answer here is to not use the range
Thomas Nyberg wrote:
> Hello,
>
> I'm trying to understand native namespaces. I'm currently using python
> 3.5 as packaged in debian 9. I've been following the instructions here:
>
> https://packaging.python.org/guides/packaging-namespace-packages/#native-namespace-packages
>
> Those instructio
On 2017-10-04, 20/20 Lab wrote:
> It's not quite a 'learning exercise', but I learn on my own if
> I treat it as such. This is just to cut down a few hours of
> time for me every week filtering the file by hand for the
> office manager.
That looks like a 30-second job using a pivot table in Exce
On Thu, 5 Oct 2017 01:23 pm, Christopher Reimer wrote:
> Greetings,
>
> I've always installed the latest and greatest version of Python 3 to develop
> my own programs. I'm planning to release a program to the public. I could
> toss in a note that the program runs on the latest version of Python 3
On 10/05/2017 04:07 PM, Peter Otten wrote:
> Are you sure you are using the correct interpreter? When I activate a
> virtual environment it changes the prompt like so:
Sorry I just cut out the extra cruft from my prompt for clarity. (In
hindsight, I should probably have left the `(venv)` prompt i
On 10/05/2017 07:28 AM, Neil Cerutti wrote:
On 2017-10-04, 20/20 Lab wrote:
It's not quite a 'learning exercise', but I learn on my own if
I treat it as such. This is just to cut down a few hours of
time for me every week filtering the file by hand for the
office manager.
That looks like a 30
On 10/04/2017 04:48 PM, Dennis Lee Bieber wrote:
On Wed, 4 Oct 2017 09:42:18 -0700, 20/20 Lab declaimed
the following:
Well -- since your later post implies this is not some "homework
assignment"...
Looking for advice for what looks to me like clumsy code.
EMP1 = [0,0]
EMP2 = [0,0]
On 10/04/2017 05:11 PM, Irv Kalb wrote:
I'm assuming from your posts that you are not a student. If that is the case,
look at my solution below.
On Oct 4, 2017, at 9:42 AM, 20/20 Lab wrote:
Looking for advice for what looks to me like clumsy code.
I have a large csv (effectively garbage)
On 2017-10-05, bartc wrote:
> Note that Unix way isn't the ONLY way of doing things.
Of course not, but it is the CORRECT way of doing things.
:)
--
Grant Edwards grant.b.edwardsYow! Am I in GRADUATE
at SCHOOL yet?
Hi folks,
>> isinstance(type, object) is True # 1
and
>> isinstance(object, type) is True # 2
its means type is object is type, But i am not sure how is this.
For what i can understand is
for #1: since every thing is object in python, type is also an object.
and
for #2: object is a base
On Thu, Oct 5, 2017 at 10:26 PM, bartc wrote:
> On 05/10/2017 12:09, Chris Angelico wrote:
>>
>> On Thu, Oct 5, 2017 at 9:56 PM, bartc wrote:
>>>
>>> This doesn't make sense. For interactive use, you wouldn't bother testing
>>> for eof, as you'd be testing the eof status of the keyboard.
>>
>>
>>
On Fri, Oct 6, 2017 at 3:17 AM, Naveen Yadav wrote:
> Hi folks,
>
>
>>> isinstance(type, object) is True # 1
> and
>>> isinstance(object, type) is True # 2
>
>
> its means type is object is type, But i am not sure how is this.
>
> For what i can understand is
> for #1: since every thing is obj
On Thu, 5 Oct 2017 07:29 am, Christian Gollwitzer wrote:
> To understand Stefan's way of teaching, take a look at his other
> courses, for example the C++ course:
Thanks for this Christian. It has been an eye-opener. More comments below.
> http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/c
On Fri, 6 Oct 2017 03:17 am, Naveen Yadav wrote:
> Hi folks,
>
>
>>> isinstance(type, object) is True # 1
> and
>>> isinstance(object, type) is True # 2
>
>
> its means type is object is type, But i am not sure how is this.
No. type and object are not the same thing:
py> type is object
Thomas Nyberg wrote:
> Hello,
>
> I'm trying to understand native namespaces. I'm currently using python
> 3.5 as packaged in debian 9. I've been following the instructions here:
>
> https://packaging.python.org/guides/packaging-namespace-packages/#native-namespace-packages
>
> Those instructio
Thomas Jollans schreef op 5/10/2017 10:30:
On 2017-10-05 06:47, Steve D'Aprano wrote:
On Thu, 5 Oct 2017 02:54 pm, Chris Angelico wrote:
(There are exceptions even to the longer form of the rule, but only a
handful. English isn't a tidy language.)
Even with the longer version of the rule, ther
Op 2017-10-05, Thomas Nyberg schreef :
> Btw if anyone knows a better way to handle this sort of thing, I'm all
> ears. Given my current implementation I could use any compression that
> works with stdin/stdout as long as I could sort out the waiting on the
> subprocess. In fact, bzip2 is probably
On 05/10/2017 18:01, Chris Angelico wrote:
On Thu, Oct 5, 2017 at 10:26 PM, bartc wrote:
On 05/10/2017 12:09, Chris Angelico wrote:
On Thu, Oct 5, 2017 at 9:56 PM, bartc wrote:
This doesn't make sense. For interactive use, you wouldn't bother testing
for eof, as you'd be testing the eof st
On 05/10/17 20:38, Stephan Houben wrote:
> Op 2017-10-05, Thomas Nyberg schreef :
>> Btw if anyone knows a better way to handle this sort of thing, I'm all
>> ears. Given my current implementation I could use any compression that
>> works with stdin/stdout as long as I could sort out the waiting on
Steve D'Aprano writes:
> There's no link to the original paper, only to secondary sources that discuss
> it, e.g.:
>
> http://phys.org/pdf128266927.pdf
> [1] Anecdotes are not data, but for what it is worth, just in the last two
> days I came across two examples of this. Teaching a boy in Year
On 10/05/2017 04:23 AM, Christopher Reimer wrote:
> I'm leaning towards installing the latest minor version of each available
> major version, running tox to run the unit tests against each one, and seeing
> what blows up.
Perhaps you can use the service of Travis (travis-ci.org) to avoid insta
Stefan Ram wrote:
"ROGER GRAYDON CHRISTMAN" writes:
On Wed, Oct 4, 2017 22:42 Stefan Ram (r...@zedat.fu-berlin.de) wrote:
Steve D'Aprano writes:
So, "bottom-up" in this case means: iterators should be
taught before for-loops.
Why?
The easy answer here is to not use the range in the first for
Am 05.10.17 um 19:04 schrieb Steve D'Aprano:
On Thu, 5 Oct 2017 07:29 am, Christian Gollwitzer wrote:
To understand Stefan's way of teaching, take a look at his other
courses, for example the C++ course:
Thanks for this Christian. It has been an eye-opener. More comments below.
You're welco
Marko Rauhamaa wrote:
That's good advice, but it's not all that dangerous to express off-topic
statements in this newsgroup.
It may not be "dangerous", but I find it a little annoying. I wasn't
going to say anything, but now you are bringing it up explicitly.
--
https://mail.python.org/ma
Hi folks,
I have a rather simple program which cycles through a bunch of files,
does some operation on them, and then quits. There are 500 files
involved and each operation takes about 5-10 MB of memory. As you'll
see I tried to make every attempt at removing everything at the end of
each cycle so
Fetchinson . wrote:
Hi folks,
I have a rather simple program which cycles through a bunch of files,
does some operation on them, and then quits. There are 500 files
involved and each operation takes about 5-10 MB of memory. As you'll
see I tried to make every attempt at removing everything at th
On Fri, Oct 6, 2017 at 8:06 AM, Fetchinson . via Python-list
wrote:
> Hi folks,
>
> I have a rather simple program which cycles through a bunch of files,
> does some operation on them, and then quits. There are 500 files
> involved and each operation takes about 5-10 MB of memory. As you'll
> see
On 10/5/17, Chris Angelico wrote:
> On Fri, Oct 6, 2017 at 8:06 AM, Fetchinson . via Python-list
> wrote:
>> Hi folks,
>>
>> I have a rather simple program which cycles through a bunch of files,
>> does some operation on them, and then quits. There are 500 files
>> involved and each operation tak
On 05/10/2017 22:06, Fetchinson . wrote:
Hi folks,
I have a rather simple program which cycles through a bunch of files,
does some operation on them, and then quits. There are 500 files
involved and each operation takes about 5-10 MB of memory. As you'll
see I tried to make every attempt at remo
hello all,what is the command to stop and start windows services ?
i can't install win32serviceutil bec am using latest python version.
--
https://mail.python.org/mailman/listinfo/python-list
Steve D'Aprano wrote:
I've seen (or at least, I remember seeing)
diagrams of matter/antimatter annihilation with the two particles coming
together and a single photon coming out: a simplified and strictly wrong view
of the physics.
It may or may not be wrong, depending on what the diagram was
s
On Oct 5, 2017, at 1:11 PM, Irmen de Jong wrote:
>
>> On 10/05/2017 04:23 AM, Christopher Reimer wrote:
>>
>> I'm leaning towards installing the latest minor version of each available
>> major version, running tox to run the unit tests against each one, and
>> seeing what blows up.
>
> Perhap
On Thursday, October 5, 2017 at 6:16:44 PM UTC-4, Prabu T.S. wrote:
> hello all,what is the command to stop and start windows services ?
> i can't install win32serviceutil bec am using latest python version.
Please advice on this
--
https://mail.python.org/mailman/listinfo/python-list
bartc wrote:
It can be done with an in-band end-of-data code,
Then you need some way of escaping that in-band code, in case
it happens to equal some of the data you want to sort. And
you need to ensure that your input is escaped properly.
All of which adds a lot of complexity.
Yes, I tried typ
Gregory Ewing :
> bartc wrote:
>> Yes, I tried typing 'sort' in Linux, where it apparently hangs (same
>> on Windows actually). The reason: because it might have killed
>> someone to have added a message saying what you are expected to type
>> and how to end it. (Namely, press Ctrl-D start at the
Carolinas HealthCare System: Consumer Analytics
John A. Quelch; Margaret Rodriguez
Source Harvard Business School
Product # 515060-PDF-ENG
General Instructions
Please download this case from the Harvard website that you used to purchase
the course pack at the beginning of the semester. Th
On 05/10/2017 23:42, Gregory Ewing wrote:
bartc wrote:
It can be done with an in-band end-of-data code,
Then you need some way of escaping that in-band code, in case
it happens to equal some of the data you want to sort.
It needn't be a big deal. You can do this (you have to in Python as the
On 06/10/2017 00:38, Stefan Ram wrote:
"Fetchinson ." writes:
I have a rather simple program which cycles through a bunch of files,
does some operation on them, and then quits. There are 500 files
involved and each operation takes about 5-10 MB of memory. As you'll
see I tried to make every att
On 2017-10-05 23:32, Prabu T.S. wrote:
On Thursday, October 5, 2017 at 6:16:44 PM UTC-4, Prabu T.S. wrote:
hello all,what is the command to stop and start windows services ?
i can't install win32serviceutil bec am using latest python version.
Please advice on this
Ask Google: windows service
On Thursday, October 5, 2017 at 8:33:02 PM UTC-4, MRAB wrote:
> On 2017-10-05 23:32, Prabu T.S. wrote:
> > On Thursday, October 5, 2017 at 6:16:44 PM UTC-4, Prabu T.S. wrote:
> >> hello all,what is the command to stop and start windows services ?
> >> i can't install win32serviceutil bec am using l
On Friday, May 8, 2009 at 3:38:25 AM UTC-7, bvidinli wrote:
> if anybody needs:
> http://code.google.com/p/phppython/
The link is down.
I'd like to give a plug to mynewly released product `pyx.php` Python module:
https://wordpy.com/pyx/php/
https://github.com/wordpy/pyx
Run Converted PHP Codes
On Fri, Oct 6, 2017 at 11:08 AM, bartc wrote:
> I don't run these things often enough to remember exactly how to specify an
> EOF with the keyboard. It might be:
>
> - One of Ctrl C, D, Z or Break
This is your problem, not the program's.
ChrisA
--
https://mail.python.org/mailman/listinfo/python
On Fri, 6 Oct 2017 10:38 am, Stefan Ram wrote:
> "Fetchinson ." writes:
>>I have a rather simple program which cycles through a bunch of files,
>>does some operation on them, and then quits. There are 500 files
>>involved and each operation takes about 5-10 MB of memory. As you'll
>>see I tried t
On 10/04/2017 04:50 PM, Stefan Ram wrote:
names: are sequences of letters and stand for values
function names: names that stand for callable values
function call operator: calls a callable value (first operand)
argument: if present, it's value is passed to the function
And, lo, I have explai
On 2017-10-06 01:37, Prabu T.S. wrote:
On Thursday, October 5, 2017 at 8:33:02 PM UTC-4, MRAB wrote:
On 2017-10-05 23:32, Prabu T.S. wrote:
> On Thursday, October 5, 2017 at 6:16:44 PM UTC-4, Prabu T.S. wrote:
>> hello all,what is the command to stop and start windows services ?
>> i can't insta
>
> As long as I have two teachers here, which textbooks are you using? I am
> hoping to teach a college course in Python next fall.
>
> Thanks,
> Bill
>
>
At least one more. I teach Intro to Python courses at two colleges in Silicon
Valley. These courses are aimed at students who have ze
On Fri, 6 Oct 2017 09:57 am, Marko Rauhamaa wrote:
[quoting Bart]
>>> Yes, I tried typing 'sort' in Linux, where it apparently hangs (same
>>> on Windows actually). The reason: because it might have killed
>>> someone to have added a message saying what you are expected to type
>>> and how to end
On 10/05/2017 06:08 PM, bartc wrote:
> then it stinks. You wouldn't think much of a shell prompt that literally
> showed nothing at all instead of something like:
Indeed many programs do go to extra effort to detect if the connecting
stream is an interactive device (a tty), and if so they do emit
On Fri, 6 Oct 2017 08:06 am, Fetchinson . wrote:
> Hi folks,
>
> I have a rather simple program which cycles through a bunch of files,
> does some operation on them, and then quits. There are 500 files
> involved and each operation takes about 5-10 MB of memory. As you'll
> see I tried to make ev
Steve D'Aprano writes:
> On Fri, 6 Oct 2017 09:57 am, Marko Rauhamaa wrote:
>
> [quoting Bart]
Yes, I tried typing 'sort' in Linux, where it apparently hangs (same
on Windows actually). The reason: because it might have killed
someone to have added a message saying what you are exp
On Fri, Oct 6, 2017 at 12:07 PM, Steve D'Aprano
wrote:
> But in fairness, if the author of the `sort` command had a commitment to
> friendliness in their programs, they could have `sort` only print a message
> when it is reading from stdin and writing to stdout, much as `ls` defaults to
> outputti
On Thursday, October 5, 2017 at 9:00:19 PM UTC-4, MRAB wrote:
> On 2017-10-06 01:37, Prabu T.S. wrote:
> > On Thursday, October 5, 2017 at 8:33:02 PM UTC-4, MRAB wrote:
> >> On 2017-10-05 23:32, Prabu T.S. wrote:
> >> > On Thursday, October 5, 2017 at 6:16:44 PM UTC-4, Prabu T.S. wrote:
> >> >> hel
On Thu, Oct 5, 2017 at 17:07 Fetchinson . via Python-list <
python-list@python.org> wrote:
> Hi folks,
>
> I have a rather simple program which cycles through a bunch of files,
> does some operation on them, and then quits. There are 500 files
> involved and each operation takes about 5-10 MB of m
On Thursday, October 5, 2017 at 10:07:05 PM UTC+1, Fetchinson . wrote:
> Hi folks,
>
> I have a rather simple program which cycles through a bunch of files,
> does some operation on them, and then quits. There are 500 files
> involved and each operation takes about 5-10 MB of memory. As you'll
> s
On Friday, October 6, 2017 at 2:05:58 AM UTC+1, Irv Kalb wrote:
>
> The range function is discussed after that.
>
FWIW range isn't a function in Python 3. From
https://docs.python.org/3/library/functions.html#func-range "Rather than being
a function, range is actually an immutable sequence
On Monday, July 3, 2017 at 11:25:21 AM UTC-4, Test Banks wrote:
> Greetings,
>
> You can get Solution Manuals and Test Bank for " Human Anatomy, 9th Edition
> by Frederic H. Martini, Robert B. Tallitsch, Judi L. Nath " at very
> reasonable price. Our team is available 24/7 and 365 days / year t
On Thu, 05 Oct 2017 19:14:33 -0600, Michael Torrie wrote:
> It all depends on what the command's purpose is for, and how it's
> designed to be chained with other commands (cat for example).
They're almost all designed to be chained with other commands. Even
diff and ed are designed to work toget
Steve D'Aprano wrote:
Plus the downtime and labour needed to install the memory, if the computer
will even take it.
Obviously we need an architecture that supports hot-swappable
robot-installable RAM.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, 5 October 2017 21:47:34 UTC+5:30, Naveen Yadav wrote:
> Hi folks,
>
>
> >> isinstance(type, object) is True # 1
> and
> >> isinstance(object, type) is True # 2
>
>
> its means type is object is type, But i am not sure how is this.
>
> For what i can understand is
> for #1: s
On Fri, Oct 6, 2017 at 4:14 PM, Gregory Ewing
wrote:
> Steve D'Aprano wrote:
>>
>> Plus the downtime and labour needed to install the memory, if the computer
>> will even take it.
>
>
> Obviously we need an architecture that supports hot-swappable
> robot-installable RAM.
>
Cloud computing is the
On 10/05/2017 10:38 PM, Dan Sommers wrote:
> On Thu, 05 Oct 2017 19:14:33 -0600, Michael Torrie wrote:
>
>> It all depends on what the command's purpose is for, and how it's
>> designed to be chained with other commands (cat for example).
>
> They're almost all designed to be chained with other c
79 matches
Mail list logo