Hello All,
Could someone explain " functools.update_wrapper" with simple examples?
Regards,
Janus
--
*Satajanus Nig. Ltd
*
___
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinf
I'm looking for a term to call the kind of Python programming that
Python is, in other words, programming with no branching, no GOTOs, no
statement labels and no line numbers. I'm tempted to call it
Structured Progamming, but we had that in COBOL, and this is not like
COBOL.
It seems to be with Py
On 9 December 2011 20:07, Cranky Frankie wrote:
> I'm looking for a term to call the kind of Python programming that
> Python is, in other words, programming with no branching, no GOTOs, no
> statement labels and no line numbers. I'm tempted to call it
> Structured Progamming, but we had that in
On Fri, Dec 9, 2011 at 3:54 PM, Sarma Tangirala
wrote:
>
> On 9 December 2011 20:07, Cranky Frankie wrote:
>
>> I'm looking for a term to call the kind of Python programming that
>>
>> <...snip...>
>
>>
> The keyword you are looking for is 'programming paradigm' and python
> implements several a
On 9 December 2011 20:50, Dario Lopez-Kästen wrote:
> On Fri, Dec 9, 2011 at 3:54 PM, Sarma Tangirala > wrote:
>
>>
>> On 9 December 2011 20:07, Cranky Frankie wrote:
>>
>>> I'm looking for a term to call the kind of Python programming that
>>>
>>> <...snip...>
>
>>
>>>
>> The keyword you are lo
Cranky Frankie wrote:
I'm looking for a term to call the kind of Python programming that
Python is, in other words, programming with no branching, no GOTOs, no
statement labels and no line numbers. I'm tempted to call it
Structured Progamming, but we had that in COBOL, and this is not like
COBOL.
Sarma Tangirala wrote:
The point is its a scripted language.
Define "scripted language". (Scripting language?)
Most of what you want to do should be
about a line. Python is derived from the idea of scripted languages wherein
constructs like loops and functions were added for more control.
On 9 December 2011 21:44, Steven D'Aprano wrote:
> Sarma Tangirala wrote:
>
> The point is its a scripted language.
>>
>
> Define "scripted language". (Scripting language?)
>
>
>
I meant scripting language. :)
>
> Most of what you want to do should be
>> about a line. Python is derived from t
Hi,
Can Python easily be installed on a Windows Vista computer without needing
administrative rights to that machine?
Thanks.
Jim
Jim Homme,
Usability Services,
Phone: 412-544-1810.
This e-mail and any attachments to it are confidential and are intended solel
I have tried to enter the first sample program from p. 19 in Grayson:
Python and Tkinter Programming. When I run the program I get an error
as follows:
Traceback (most recent call last):
File "/home/dick/Desktop/calc1.py", line 50, in
if _name_ == '_main_':
NameError: name '_name_' is not d
On 09/12/11 15:36, Sarma Tangirala wrote:
Where does it say that python was originally not designed to be
scripted? If thats the case then I agree my comment was completely
incorrect. I read somewhere that it was designed so.
It was designed as a "scripting language" but not for the purpose of
On 12/09/2011 02:03 PM, Richard Lyons wrote:
I have tried to enter the first sample program from p. 19 in Grayson:
Python and Tkinter Programming. When I run the program I get an error
as follows:
Traceback (most recent call last):
File "/home/dick/Desktop/calc1.py", line 50, in
if _name_
Finding factorial of 8 or 9 isn't big. If I would like to find factorial of
32327, how can I ??
___
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mail
On 09/12/11 19:03, Richard Lyons wrote:
I have tried to enter the first sample program from p. 19 in Grayson:
Python and Tkinter Programming. When I run the program I get an error
as follows:
Traceback (most recent call last):
File "/home/dick/Desktop/calc1.py", line 50, in
if _name_ == '_main_
On 09/12/11 19:24, Alan Gauld wrote:
In February 1991, after just over a year of development, I decided to
post to USENET. The rest is in the Misc/HISTORY file.
=
Hopefully that clarifies rather than condfusing! :-)
The HISTORY file gives more detail still.
Hmm, I
On 09/12/11 19:25, surya k wrote:
Finding factorial of 8 or 9 isn't big. If I would like to find factorial of
32327, how can I ??
Just type it in, but expect to wait a long time for the answer...
Python integers are limited by the memory of your machi
On 12/09/2011 02:25 PM, surya k wrote:
Finding factorial of 8 or 9 isn't big. If I would like to find factorial of
32327, how can I ??
___
Tutor maillist - [email protected]
To unsubscribe or change subscriptio
> Date: Fri, 9 Dec 2011 14:53:07 -0500
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Re: [Tutor] how to handle big numbers
>
> On 12/09/2011 02:25 PM, surya k wrote:
> > Finding factorial of 8 or 9 isn't big. If I would l
On Fri, Dec 9, 2011 at 12:41 PM, Homme, James wrote:
> Hi,
>
> Can Python easily be installed on a Windows Vista computer without needing
> administrative rights to that machine?
>
>
>
If you use portable python: http://www.portablepython.com/ that might work
for you.
HTH,
Wayne
On 12/09/2011 03:04 PM, surya k wrote:
Date: Fri, 9 Dec 2011 14:53:07 -0500
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [Tutor] how to handle big numbers
On 12/09/2011 02:25 PM, surya k wrote:
Finding factorial of 8 or
> There are other approaches that may bear looking at, like the SciPy library.
> But first we'd need to know just what you need with this factorial.
Wouldn't a prime swing implementation be the absolutely fastest?
Something like this:
http://en.literateprograms.org/Special:Downloadcode/Factorials
>>Can Python easily be installed on a Windows Vista computer without needing
>>administrative rights to that machine?
>If you use portable python: http://www.portablepython.com/ that might work for
>you.
You can manually install python relatively easily without administrative
rights.
Although,
On Fri, Dec 9, 2011 at 1:41 PM, Homme, James wrote:
> Can Python easily be installed on a Windows Vista computer without needing
> administrative rights to that machine?
>
I thought the standard installer worked for non-admin installs, as long as
you select "Just for me" instead of "All users on
i need to overwrite and attribute from the inherited class. i also need to
run the constructor of the super class. here is the code
import datetime
class DateTime(datetime.datetime):
def __init__(self, year, month, day, *args):
super().__init__(year, month, day, *args)
if self.year >= 1
On Fri, Dec 9, 2011 at 4:43 PM, rail shafigulin
wrote:
> i need to overwrite and attribute from the inherited class. i also need to
> run the constructor of the super class. here is the code
>
> import datetime
>
> class DateTime(datetime.datetime):
> def __init__(self, year, month, day, *args):
>class DateTime(datetime.datetime):
> def __init__(self, year, month, day, *args):
>super().__init__()
>if self.year >= 1000:
> self.year = self.year % 1000
I have no idea how you could use the sample you have given (or why) but, this
was actually a fun exercise that forced me to le
surya k wrote:
Finding factorial of 8 or 9 isn't big. If I would like to find factorial of 32327, how can I ??
py> import math
py> n = math.factorial(32327) # takes about 2 seconds on my computer
py> s = str(n) # takes about 30 seconds
py> len(s)
131744
py> print s[:10] + "..."
I appreciate all the comments in this thread so far, but what I'm
really looking for is what to call the style of programming where you
have no direct branching via line numbers, statement names, and gotos.
I'm finding that lacking these things that I've been familiar with in
other languages is goo
On 12/09/2011 08:58 PM, Cranky Frankie wrote:
I appreciate all the comments in this thread so far, but what I'm
really looking for is what to call the style of programming where you
have no direct branching via line numbers, statement names, and gotos.
I'm finding that lacking these things that I
From: Dave Angel
<>
Probably because I work in a shop that still heavily uses older
languages like COBOL and CULPRIT where you still deal with labels,
branching, goto, etc. The fact that it is possible to code
"structured" that way AND the Python way amazes me.
--
Frank L. "Cranky Frankie"
Cranky Frankie wrote:
I appreciate all the comments in this thread so far, but what I'm
really looking for is what to call the style of programming where you
have no direct branching via line numbers, statement names, and gotos.
Structured programming.
I'm finding that lacking these things t
Cranky Frankie wrote:
From: Dave Angel
<>
Probably because I work in a shop that still heavily uses older
languages like COBOL and CULPRIT where you still deal with labels,
branching, goto, etc. The fact that it is possible to code
"structured" that way AND the Python way amazes me.
You have
*hi,*
*
*
*Consider a list: a = [1,2,3]*
*
*
*& a simple function, which when called it will append 100 to the list.*
*
*
*def app(x):*
* return x.append(100)*
*
*
*p = app(a)*
*
*
*now list holds appended value [1,2,3,100]*
*but p is empty... why it is?*
*
*
*please teach.*
___
33 matches
Mail list logo