On Thu, Apr 24, 2014 at 01:14:33AM -0700, Albert-Jan Roskam wrote:
> - Original Message -
> > From: Steven D'Aprano
> > To: tutor@python.org
> > Cc:
> > Sent: Thursday, April 24, 2014 3:00 AM
> > Subject: Re: [Tutor] global list
> >
>
>
>
> > You only need to define variables as glob
On 24/04/14 21:48, Mark Lawrence wrote:
On 24/04/2014 21:30, Albert-Jan Roskam wrote:
As a side not, I find that variables (attributes) defined in __init__
are also much like globals, but that's probably a different discussion.
Would you please be kind enough to explain your logic.
I can't
On 24/04/2014 21:30, Albert-Jan Roskam wrote:
As a side not, I find that variables (attributes) defined in __init__ are also
much like globals, but that's probably a different discussion.
Would you please be kind enough to explain your logic.
--
My fellow Pythonistas, ask not what our langu
> From: Peter Otten <__pete...@web.de>
>To: tutor@python.org
>Sent: Thursday, April 24, 2014 1:49 PM
>Subject: Re: [Tutor] global list
>
>
>Albert-Jan Roskam wrote:
>> - Original Message -
>>> From: Steven D'Aprano
>>> To: tutor@python.org
>>> Cc:
>>>
On 24/04/14 17:08, Peter Otten wrote:
>>> logging.basicConfig(file='./log.txt', level=logging.DEBUG)
>>> logging.info('some stuff')
INFO:root:some stuff
The printed logging messages might give a hint that you were not successful
in your attempt to specify a log-file. Try "filename" instead
Alan Gauld wrote:
> I've been playing with the logging module - long overdue!
>
> I started with the basic tutorial but fell at the first hurdle.
> It says to specify a file in the logging.basicConfig() function then
> asks you to open the file after logging some events.
>
> But I can't find the
I've been playing with the logging module - long overdue!
I started with the basic tutorial but fell at the first hurdle.
It says to specify a file in the logging.basicConfig() function then
asks you to open the file after logging some events.
But I can't find the file anywhere...
Here's my c
On Tue, Apr 22, 2014 at 10:47:09AM -0700, Alex Kleider wrote:
> On 2014-04-21 19:35, Steven D'Aprano wrote:
>
> >Does docopt solve the Original Poster's question? If not, that advice
> >is not terribly helpful.
>
> I don't pretend to fully understand the Original Poster's requirement
> but I be
Albert-Jan Roskam wrote:
>
>
>
>
>
> - Original Message -
>> From: Steven D'Aprano
>> To: tutor@python.org
>> Cc:
>> Sent: Thursday, April 24, 2014 3:00 AM
>> Subject: Re: [Tutor] global list
>>
>
>
>
>> You only need to define variables as global if you assign to them:
>>
>> de
On 24/04/14 00:14, Martin wrote:
If I run from a command prompt, however, I get
C:\Users\Martin\Documents\College\python>python pickle.py
You have called your file pickle.py.
So when you try to import pickle the interpreter sees your file first
and imports that not the library pickle.
Neve
Experimenting with pickling...
import pickle
file1 = open('first.txt','r')
contents = file1.read()
file1.close()
print(contents)
file2 = open('pickle.dat','wb')
pickle.dump(contents,file2,True)
file2.close()
contents = ''
file3 = open('pickle.dat','rb')
contents = pickle.load(file3)
print(co
On 04/23/2014 06:46 PM, Denis Heidtmann wrote:
In a coursera python course video the following code was presented:
a = [4,5,6]
def mutate_part(x):
a[1] = x
mutate_part(200)
The presenter said something like "a is a global variable, so a becomes
[4,200,6] after running mutate_part(200)."
On 24/04/2014 09:23, Danny Yoo wrote:
Should have no runtime performance difference.
For similar reasons, using a very long variable name does not change a
program's runtime performance.
Please quote some context, this is meaningless without it, thanks.
--
My fellow Pythonistas, ask not wha
Should have no runtime performance difference.
For similar reasons, using a very long variable name does not change a
program's runtime performance.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.pyth
- Original Message -
> From: Steven D'Aprano
> To: tutor@python.org
> Cc:
> Sent: Thursday, April 24, 2014 3:00 AM
> Subject: Re: [Tutor] global list
>
> You only need to define variables as global if you assign to them:
>
> def function(x):
> global a
> a = [1, 2, 3, x]
-- Forwarded message --
From: "Danny Yoo"
Date: Apr 24, 2014 1:14 AM
Subject: Re: [Tutor] Fwd: Puzzle - Next Step to our interviewing process -
Pramati Technologies!
To: "Sunil Tech"
Cc:
On Apr 24, 2014 12:50 AM, "Sunil Tech" wrote:
>
> Hi danny,
>
> i want to delete this email
16 matches
Mail list logo