Got it, many thanks for your help.
On Tue, Oct 2, 2012 at 7:59 PM, Oscar Benjamin
wrote:
> Hi Cecilia, I'm sending this again as the first message was sent only
> to you (I hadn't realised that your own message was sent only to me as
> well). If you want to reply please reply-all to this message.
On Wed, Oct 3, 2012 at 1:28 AM, Katya Stolpovskaya
wrote:
>
> Thank you for you reply, but with "long" I got the same error:
>
from sys import *
long
>
> Traceback (most recent call last):
> File "", line 1, in
> long
> NameError: name 'long' is not defined
I assumed some familiarity w
On 03/10/12 12:33, eryksun wrote:
On Wed, Oct 3, 2012 at 1:28 AM, Katya Stolpovskaya
Thank you for you reply, but with "long" I got the same error:
from sys import *
long
Traceback (most recent call last):
File "", line 1, in
long
NameError: name 'long' is not defined
I assumed some fam
On Wed, Oct 3, 2012 at 2:53 PM, Alan Gauld wrote:
>
> The only times you really need to worry about maxsize is when interfacing to
> external non-python code.
It's not generally a problem, but if you're on a 32-bit platform, for
which sys.maxsize is 2**31 - 1, that sets the maximum length of a
se
I'm wondering if there is something I overlooked for this function I wrote...
and also whether it could've been done destrictively instead of returning a new
dictionary:
def dictNoneValueTo(d, new_value=''):
"""force None values in a dictionary to a default value"""
for k in d:
i
On 10/03/2012 03:59 PM, Brannon, Terrence wrote:
> I'm wondering if there is something I overlooked for this function I wrote...
> and also whether it could've been done destrictively instead of returning a
> new dictionary:
>
> def dictNoneValueTo(d, new_value=''):
> """force None values in
On 10/3/2012 3:59 PM, Brannon, Terrence wrote:
I'm wondering if there is something I overlooked for this function I
wrote... and also whether it could've been done destrictively instead
of returning a new dictionary:
I don't understand your question. Could you clarify? What does
"destrict
I'm just learning Python, so I apologize for a newby question. I'm trying
to work with lists of lists, the lowest level of which hold one or more
tuples. I've tried to condense what I've tried. The code is:
#! Python 2.7
import copy
list = []
for i in range(8):
list.append((i, i+1))
H = [[l
So Ive got code that i import a module to get certain saved variables,
where i edit the text file that comprises the module to edit those saved
variable. My problem is I cant reload the module to access those modified
variables.
I was wondering how can i reload or otherwise refresh the module.
pyth
On 04/10/12 11:56, Leo Degon wrote:
So Ive got code that i import a module to get certain saved variables,
where i edit the text file that comprises the module to edit those saved
variable. My problem is I cant reload the module to access those modified
variables.
I was wondering how can i reload
On 10/3/2012 9:56 PM, Leo Degon wrote:
So Ive got code that i import a module to get certain saved variables,
where i edit the text file that comprises the module to edit those
saved variable. My problem is I cant reload the module to access those
modified variables.
Why not? What did you try?
On 10/03/2012 09:56 PM, Leo Degon wrote:
> So Ive got code that i import a module to get certain saved variables,
> where i edit the text file that comprises the module to edit those saved
> variable. My problem is I cant reload the module to access those modified
> variables.
> I was wondering how
On 04/10/12 11:46, Ed Owens wrote:
I'm just learning Python, so I apologize for a newby question. I'm trying
to work with lists of lists, the lowest level of which hold one or more
tuples. I've tried to condense what I've tried.
Hi Ed, and welcome!
The code is:
I'm afraid I can't make he
Thanks to all who responded. There was much more going on here than I
ever would have suspected. I am glad I asked the questions I did. This
has been very informative.
On Tue, Oct 2, 2012 at 11:53 PM, Dave Angel wrote:
>
> There are two operations supported by (most) objects that produce a
> str
On Wed, Oct 3, 2012 at 1:38 AM, Steven D'Aprano wrote:
> The long answer is a bit more subtle, and rather long.
I had initial suspicions this would be the case Thanks for yours and
Dave's detailed exposition!
[...]
> Python is no different: words, text if you will, that are part of the
> code
You are fundamentally correct about my confusion, though I'm trying to work
with tuples as the lowest level, which may not be relevant here.
-Original Message-
.
py> H = [[1, 2]]
py> J = [H[0]]
py> print H
[[1, 2]]
py> print J
[[1, 2]]
py> H[0][0] = 99
py> print H # expected, and got, [
On Wed, Oct 3, 2012 at 11:52 PM, Ed Owens wrote:
>
> py> H = [[1, 2]]
> py> J = [H[0]]
> py> H[0][1] = copy.deepcopy(H[0][0])
>
> How do I decouple these references?
You can use the slice H[0][:] to get a shallow copy of the H[0] list.
By "shallow copy" I mean you get a new list that contains the
17 matches
Mail list logo