Gregory Ewing :
> Mass on its own is not a conserved quantity. The thing that's
> conserved is total energy.
Similarly, momentum is conserved.
Whether mass is conserved or not depends on the chosen terminology.
> As far as I know, there are no negative masses anywhere in any of our
> current th
alister wrote:
On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote:
On Thu, Mar 3, 2016 at 10:21 AM, alister
wrote:
Antimatter has positive mass.
Are you sure?
mix 1 atom of hydrogen + 1 of anti hydrogen & you end up with 0 mass
That's not because anti-hydrogen has negative mass, though.
Steven D'Aprano :
> class C:
> def method(self):
> if (result is None
> or self.some_condition()
> or len(some_sequence) > 100
> or some_other_condition
> or page_count < 5
> ):
> do_processing()
>
Tim Golden wrote:
A few teachers recently were discussing this on Twitter. One suggested
that his pupils always add their initials to whatever filename they use.
Works well until Lawrence Ian Bernstein writes his own
module called "url"...
--
Greg
--
https://mail.python.org/mailman/listinfo/py
On Fri, 4 Mar 2016 12:23 pm, INADA Naoki wrote:
>>
>>
>> Indeed. I don't understand why, when splitting a condition such as this,
>> people tend to put the operator at the end of each line.
>>
>>
> Because PEP8 says:
>
>> The preferred place to break around a binary operator is after the
> operat
On Thu, Mar 3, 2016 at 4:58 PM, Chris Angelico wrote:
> On Fri, Mar 4, 2016 at 8:38 AM, MRAB wrote:
>> Is it even possible to zip a link?
>>
>> A quick search came up with this:
>>
>> Are hard links possible within a zip archive?
>> http://stackoverflow.com/questions/8859616/are-hard-links-possib
On 04/03/16 01:23, INADA Naoki wrote:
Indeed. I don't understand why, when splitting a condition such as this,
people tend to put the operator at the end of each line.
Because PEP8 says:
The preferred place to break around a binary operator is after the
operator, not before it.
I mean in
>
>
> Indeed. I don't understand why, when splitting a condition such as this,
> people tend to put the operator at the end of each line.
>
>
Because PEP8 says:
> The preferred place to break around a binary operator is after the
operator, not before it.
http://pep8.org/#maximum-line-length
--
ht
On 04/03/16 00:13, Steven D'Aprano wrote:
class C:
def method(self):
if (result is None
or self.some_condition()
or len(some_sequence) > 100
or some_other_condition
or page_count < 5
):
do_
>
>
> class C:
> def method(self):
> if (result is None
> or self.some_condition()
> or len(some_sequence) > 100
> or some_other_condition
> or page_count < 5
> ):
> do_processing()
>
>
> Looks fine
On Fri, 4 Mar 2016 03:47 am, Marko Rauhamaa wrote:
> John Gordon :
>
>> In <871t7sbkex@elektro.pacujo.net> Marko Rauhamaa
>> writes:
>>
>>> Ethan Furman :
>>
>>> > No, it isn't. Using '\' for line continuation is strongly
>>> > discouraged.
>>
>>> Why would you discourage valid syntax?
>>
>
On Fri, 4 Mar 2016 09:51 am, vlyamt...@gmail.com wrote:
> i have list of strings "data" and i am trying to build reverse list data1
Use a slice with a negative step-size and defaults for the start and end
positions.
data1 = data[::-1]
--
Steven
--
https://mail.python.org/mailman/listinfo
On Fri, 4 Mar 2016 07:20 am, alister wrote:
> On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote:
>> Antimatter has positive mass.
>
> Are you sure?
> mix 1 atom of hydrogen + 1 of anti hydrogen & you end up with 0 mass (+
> LOTTS of energy)
>
> To be honest it is all over my head
It's good
> On Mar 3, 2016, at 3:20 PM, alister wrote:
>
> On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote:
>
>> On Thu, Mar 3, 2016 at 10:21 AM, alister
>> wrote:
>>> On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote:
1) No physical object can have negative mass.
2) I am a part of
On 03/03/2016 02:51 PM, vlyamt...@gmail.com wrote:
i have list of strings "data" and i am trying to build reverse list data1
data1 = []
for i in range(len(data)):
j = len(data) - i
data1.append(data[j])
but i have the following error:
data1.append(data[j])
IndexError: list index out of r
On 03/03/2016 22:51, vlyamt...@gmail.com wrote:
i have list of strings "data" and i am trying to build reverse list data1
data1 = []
for i in range(len(data)):
j = len(data) - i
data1.append(data[j])
but i have the following error:
data1.append(data[j])
IndexError: list index out of rang
On 2016-03-03 23:08, John Gordon wrote:
In <8b3d06eb-0027-4396-bdf8-fee0cc9ff...@googlegroups.com> vlyamt...@gmail.com
writes:
i have list of strings "data" and i am trying to build reverse list data1
data1 = []
for i in range(len(data)):
j = len(data) - i
data1.append(data[j])
but i
On Thu, Mar 3, 2016 at 6:08 PM, John Gordon wrote:
> In <8b3d06eb-0027-4396-bdf8-fee0cc9ff...@googlegroups.com>
> vlyamt...@gmail.com writes:
>
> > i have list of strings "data" and i am trying to build reverse list data1
> > data1 = []
> > for i in range(len(data)):
> >j = len(data) - i
> >
In <8b3d06eb-0027-4396-bdf8-fee0cc9ff...@googlegroups.com> vlyamt...@gmail.com
writes:
> i have list of strings "data" and i am trying to build reverse list data1
> data1 = []
> for i in range(len(data)):
>j = len(data) - i
>data1.append(data[j])
> but i have the following error:
> data1
Thank you Paul and Christian for your reply and understanding my question. I
was actually inspired by this example for IronPython and thought that this is
pretty useful for testing and exploring of C-API:
http://www.voidspace.org.uk/ironpython/ip_in_ip.shtml
So does it all boil down to GIL rest
i have list of strings "data" and i am trying to build reverse list data1
data1 = []
for i in range(len(data)):
j = len(data) - i
data1.append(data[j])
but i have the following error:
data1.append(data[j])
IndexError: list index out of range
am i doing it wrong?
Thanks
--
https://mail.pyt
On Fri, Mar 4, 2016 at 8:38 AM, MRAB wrote:
> Is it even possible to zip a link?
>
> A quick search came up with this:
>
> Are hard links possible within a zip archive?
> http://stackoverflow.com/questions/8859616/are-hard-links-possible-within-a-zip-archive
Hard links are different. Symlinks are
On 2016-03-03 20:58, Larry Martell wrote:
On Thu, Mar 3, 2016 at 1:37 PM, Larry Martell wrote:
I have a script that creates zip files of dirs containing symlinks. I
was surprised to find that the zipfiles have zipped the targets of the
links as opposed to the links themselves, which is what I w
On 2016-03-03 16:29, Oscar Benjamin wrote:
> On 3 March 2016 at 11:48, Tim Chase
> wrote:
> > On 2016-03-03 10:43, Nick Sarbicki wrote:
> >> The number of times I've had to correct a student for naming
> >> their script "turtle.py".
> >>
> >> And the number of times I've caught myself doing it...
Pavel Volkov wrote:
> Suppose, I have some resource-intensive tasks implemented as functions in
> Python.
> Those are called repeatedly in my program.
> It's guranteed that a call with the same arguments always produces the
> same return value.
> I want to cache the arguments and return values and
On Thu, Mar 3, 2016 at 1:37 PM, Larry Martell wrote:
> I have a script that creates zip files of dirs containing symlinks. I
> was surprised to find that the zipfiles have zipped the targets of the
> links as opposed to the links themselves, which is what I wanted and
> expected. Googling I found
On Thu, Mar 3, 2016 at 1:28 PM, Pavel Volkov wrote:
> Suppose, I have some resource-intensive tasks implemented as functions in
> Python.
> Those are called repeatedly in my program.
> It's guranteed that a call with the same arguments always produces the same
> return value.
> I want to cache the
Greetings Pavel,
> Suppose, I have some resource-intensive tasks implemented as
> functions in Python. Those are called repeatedly in my program.
> It's guranteed that a call with the same arguments always produces
> the same return value. I want to cache the arguments and return
> values and
Suppose, I have some resource-intensive tasks implemented as functions in
Python.
Those are called repeatedly in my program.
It's guranteed that a call with the same arguments always produces the same
return value.
I want to cache the arguments and return values and in case of repititive
call i
On Thu, Mar 3, 2016 at 1:20 PM, alister wrote:
> On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote:
>
>> On Thu, Mar 3, 2016 at 10:21 AM, alister
>> wrote:
>>> On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote:
1) No physical object can have negative mass.
2) I am a part of the
On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote:
> On Thu, Mar 3, 2016 at 10:21 AM, alister
> wrote:
>> On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote:
>>> 1) No physical object can have negative mass.
>>> 2) I am a part of the universe and have positive mass.
>>> 3) I am not Kennet
On Thu, Mar 3, 2016 at 10:03 AM, Rustom Mody wrote:
> Is it so damn hard to be a bit honest and when asked about is in python to
> reply:
>
> If you dont know what you are doing, dont use 'is' (None excepted)
> If you know why are you asking?
That seems like a rather unhelpful response.
--
http
Rob Gaddi :
> Not ugly, error-prone. The first is purely aestehetic, the second
> actually matters. Let something as simple as a trailing space sneak in
> after your backslash and your meaning changes. Blank line between;
> same thing.
Never been bitten by that.
Now, trying how emacs' indentatio
I have a script that creates zip files of dirs containing symlinks. I
was surprised to find that the zipfiles have zipped the targets of the
links as opposed to the links themselves, which is what I wanted and
expected. Googling I found this:
https://doeidoei.wordpress.com/2010/11/23/compressing-f
Marko Rauhamaa wrote:
> John Gordon :
>
>> In <871t7sbkex@elektro.pacujo.net> Marko Rauhamaa
>> writes:
>>
>>> Ethan Furman :
>>
>>> > No, it isn't. Using '\' for line continuation is strongly discouraged.
>>
>>> Why would you discourage valid syntax?
>>
>> Some things that are permissible m
On Thu, Mar 3, 2016 at 10:21 AM, alister wrote:
> On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote:
>> 1) No physical object can have negative mass.
>> 2) I am a part of the universe and have positive mass.
>> 3) I am not Kenneth.
>> 4) The sum of my mass and Kenneth's mass must exceed Ken
Oscar Benjamin wrote:
> On 3 March 2016 at 11:48, Tim Chase wrote:
>> On 2016-03-03 10:43, Nick Sarbicki wrote:
>>> The number of times I've had to correct a student for naming their
>>> script "turtle.py".
>>>
>>> And the number of times I've caught myself doing it...
>>
>> I'm surprised at the
On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote:
> On Thu, Mar 3, 2016 at 1:27 PM, Steven D'Aprano
> wrote:
>> We can be absolutely certain that Kenneth weighs less than the entire
>> universe. We don't even need a set of scales.
>
> Formal proof:
>
> 1) No physical object can have neg
On Thursday, March 3, 2016 at 7:22:43 AM UTC+5:30, Steven D'Aprano wrote:
> On Thu, 3 Mar 2016 05:12 am, Marko Rauhamaa wrote:
>
> > Steven D'Aprano :
> >
> >> In this case, "same object" carries the normal English meaning of
> >> "same" and the normal computer science meaning of "object" in the
John Gordon :
> In <871t7sbkex@elektro.pacujo.net> Marko Rauhamaa
> writes:
>
>> Ethan Furman :
>
>> > No, it isn't. Using '\' for line continuation is strongly discouraged.
>
>> Why would you discourage valid syntax?
>
> Some things that are permissible may not be desirable.
Line continuat
On 3 March 2016 at 11:48, Tim Chase wrote:
> On 2016-03-03 10:43, Nick Sarbicki wrote:
>> The number of times I've had to correct a student for naming their
>> script "turtle.py".
>>
>> And the number of times I've caught myself doing it...
>
> I'm surprised at the number of times I find myself cr
On 03/03/2016 03:57, Rustom Mody wrote:
On Thursday, March 3, 2016 at 7:59:13 AM UTC+5:30, Steven D'Aprano wrote:
On Thu, 3 Mar 2016 04:02 am, Rustom Mody wrote:
And how is [1]'s starting different from Kenneth's finding his weight
to be the weight of the universe?
Is that a trick question?
On 3 March 2016 at 15:12, Random832 wrote:
> On Thu, Mar 3, 2016, at 08:47, Peter Otten wrote:
>> This is because the last generator uf = upperfile(...) is not garbage-
>> collected and wasn't explicitly closed either.
>
> But the program hasn't ended yet when you run your assertion.
>
> import sy
Random832 wrote:
> On Thu, Mar 3, 2016, at 08:47, Peter Otten wrote:
>> This is because the last generator uf = upperfile(...) is not garbage-
>> collected and wasn't explicitly closed either.
>
> But the program hasn't ended yet when you run your assertion.
If your expectations are in line with
In <871t7sbkex@elektro.pacujo.net> Marko Rauhamaa writes:
> Ethan Furman :
> > No, it isn't. Using '\' for line continuation is strongly discouraged.
> Why would you discourage valid syntax?
Some things that are permissible may not be desirable.
--
John Gordon A is for
On 03/03/2016 09:46, m.t.e...@student.rug.nl wrote:
Hey!
I have been goggling around for the last few days and tried out many python
codes.
I want to merge two csv files, say thought_probe1.csv and thought_probe2.csv. I
want them to merge column-wise in a new csv file 'new_file.csv'.
What codi
On Thu, 03 Mar 2016 01:46:38 -0800, m.t.egle wrote:
> Hey!
>
> I have been goggling around for the last few days and tried out many
> python codes.
that is where you are going wrong.
you need to understand the concepts of what you are trying to do and an
understanding of how the language works.
On 03/03/2016 02:05, Steven D'Aprano wrote:
On Thu, 3 Mar 2016 08:49 am, Mark Lawrence wrote:
On 02/03/2016 17:23, Steven D'Aprano wrote:
On Thu, 3 Mar 2016 01:11 am, Marko Rauhamaa wrote:
What is missing is the rules that are obeyed by the "is" operator.
I think what is actually missing i
On Fri, 4 Mar 2016 02:00 am, Random832 wrote:
> On Thu, Mar 3, 2016, at 06:52, 刘琦帆 wrote:
>> I have just saw PEP 255, and it says that
>>
>> "A yield statement is not allowed in the try clause of a try/finally
>> construct. The difficulty is that there's no guarantee the generator
>> will ever b
On Thu, 3 Mar 2016 02:57 pm, Rustom Mody wrote:
> William Blake starts Auguries of Innocence with:
>
> To see a world in a grain of sand,
> And a heaven in a wild flower,
> Hold infinity in the palm of your hand,
> And eternity in an hour.
>
> Reading the whole at http://www.artofeurope.com/bla
On Thu, Mar 3, 2016, at 08:47, Peter Otten wrote:
> This is because the last generator uf = upperfile(...) is not garbage-
> collected and wasn't explicitly closed either.
But the program hasn't ended yet when you run your assertion.
import sys
_open = open
files = []
def myclose(self):
pri
On Thu, Mar 3, 2016, at 06:52, 刘琦帆 wrote:
> I have just saw PEP 255, and it says that
>
> "A yield statement is not allowed in the try clause of a try/finally
> construct. The difficulty is that there's no guarantee the generator
> will ever be resumed, hence no guarantee that the finally block
On 2016-03-03 10:43, Nick Sarbicki wrote:
> The number of times I've had to correct a student for naming their
> script "turtle.py".
>
> And the number of times I've caught myself doing it...
I'm surprised at the number of times I find myself creating an
"email.py" DESPITE KNOWING BETTER EVERY SI
刘琦帆 wrote:
> 在 2016年3月3日星期四 UTC+8下午8:14:29,Oscar Benjamin写道:
>> On 3 March 2016 at 11:52, 刘琦帆 wrote:
>> >
>> > "A yield statement is not allowed in the try clause of a try/finally
>> > construct. The difficulty is that there's no guarantee the generator
>> > will ever be resumed, hence no guaran
On Thu, 3 Mar 2016 09:45 pm, crankypuss wrote:
> Ben Finney wrote:
>
>> crankypuss writes:
>>
>>> "Python code can be packaged into stand-alone executable programs for
>>> some of the most popular operating systems, allowing the distribution
>>> of Python-based software for use on those environ
On Thu, 3 Mar 2016 09:21 pm, ast wrote:
> Hello
>
> This has to be told
>
> I created a file pickle.py in order to test some files
> read/write with objects and put it in a directory
> which is on my python path.
[...]
> I uninstalled python34 and reinstalled it, same problem
> I uninstalled
在 2016年3月3日星期四 UTC+8下午8:14:29,Oscar Benjamin写道:
> On 3 March 2016 at 11:52, 刘琦帆 wrote:
> >
> > "A yield statement is not allowed in the try clause of a try/finally
> > construct. The difficulty is that there's no guarantee the generator will
> > ever be resumed, hence no guarantee that the fina
On 3 March 2016 at 11:52, 刘琦帆 wrote:
>
> "A yield statement is not allowed in the try clause of a try/finally
> construct. The difficulty is that there's no guarantee the generator will
> ever be resumed, hence no guarantee that the finally block will ever get
> executed; that's too much a vio
I have just saw PEP 255, and it says that
"A yield statement is not allowed in the try clause of a try/finally construct.
The difficulty is that there's no guarantee the generator will ever be
resumed, hence no guarantee that the finally block will ever get executed;
that's too much a violati
Ben Finney wrote:
> crankypuss writes:
>
>> "Python code can be packaged into stand-alone executable programs for
>> some of the most popular operating systems, allowing the distribution
>> of Python-based software for use on those environments without
>> requiring the installation of a Python i
On 03/03/2016 10:43, Nick Sarbicki wrote:
> On Thu, Mar 3, 2016 at 10:26 AM ast wrote:
>
>> Hello
>>
>> This has to be told
>>
>> I created a file pickle.py
>>
>
> You could stop there.
>
> The number of times I've had to correct a student for naming their script
> "turtle.py".
A few teachers
On Thu, Mar 3, 2016 at 10:26 AM ast wrote:
> Hello
>
> This has to be told
>
> I created a file pickle.py
>
You could stop there.
The number of times I've had to correct a student for naming their script
"turtle.py".
And the number of times I've caught myself doing it...
...
Hi!
Is this a homework or something you need a quick solution for?
For the latter: 'man paste' (on Linux) :)
Anyway, some sample data and code would be good.
BR, Kimmo
03.03.2016, 11:50, m.t.e...@student.rug.nl wrote:
Hey!
I want to merge column-wise two csv files, say: file1.csv and file2.
codewiz...@gmail.com wrote:
> On Wednesday, March 2, 2016 at 3:44:07 PM UTC-5, Skip Montanaro wrote:
> >
> > if (some_condition and
> > some_other_condition and
> > some_final_condition):
> > play_bingo()
>
> How about:
>
> continue_playing = (
> some_conditio
On Thu, Mar 3, 2016 at 9:21 PM, ast wrote:
> - python -m pip list doesnt work, crash with an error message related to
> pickle
At this point, you could have come to this list, asking for help - and
posting the *entire* traceback. It may have mentioned a file name,
which would give a strong clue;
Hello
This has to be told
I created a file pickle.py in order to test some files
read/write with objects and put it in a directory
which is on my python path.
Then the nightmare began
- Idle no longer works, window no longer opens
when double clicked, no errors messsages
- python -m pip l
m.t.e...@student.rug.nl wrote:
> I want to merge column-wise two csv files, say: file1.csv and file2.csv,
> both containing two columns, into a new csv file.
>
> I could not find a good code for doing this. It never really worked.
>
> If you could show me the code with this example, I would high
Hey!
I want to merge column-wise two csv files, say: file1.csv and file2.csv, both
containing two columns, into a new csv file.
I could not find a good code for doing this. It never really worked.
If you could show me the code with this example, I would highly appreciate it.
Best wishes,
Tib
Hey!
I have been goggling around for the last few days and tried out many python
codes.
I want to merge two csv files, say thought_probe1.csv and thought_probe2.csv. I
want them to merge column-wise in a new csv file 'new_file.csv'.
What coding is smart to use in order to achieve it?
I would r
Hi Denis,
Am 03.03.16 um 06:01 schrieb Denis Akhiyarov:
Is it possible to embed CPython in CPython, e.g. using ctypes, cffi, or cython?
since you titled your question with a famous movie title, I take it more
as a "philosophical" question (musing about the CPython world) than an
actual dema
70 matches
Mail list logo