RE: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread wesley
python.org (mailto:python-list@python.org) Betreff: What is the Difference Between quit() and exit() commands in Python? What is the Difference Between quit() and exit() commands in Python? -- mail.python.org/mailman/listinfo/python-list (https://mail.python.org/mailman/listinfo/python-lis

Re: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread Eryk Sun
On 9/16/19, Hongyi Zhao wrote: > > What is the Difference Between quit() and exit() commands in Python? They're different instances of the Quitter class, which is available if site.py is imported (i.e. not with the -S command-line option). They're created by site.setquit():

Re: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread Peter Otten
Hongyi Zhao wrote: > What is the Difference Between quit() and exit() commands in Python? They are instances of the same type >>> import inspect >>> type(quit) is type(exit) True >>> print(inspect.getsource(type(quit))) class Quitter(object): def __init__(self,

What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread Hongyi Zhao
What is the Difference Between quit() and exit() commands in Python? -- https://mail.python.org/mailman/listinfo/python-list

RE: What is the difference between "ws.Messagebeep(1)" and "ws.Messagebeep(-1)" ?

2019-03-21 Thread David Raymond
sound. -Original Message- From: Python-list [mailto:python-list-bounces+david.raymond=tomtom@python.org] On Behalf Of Steve Sent: Thursday, March 21, 2019 10:00 AM To: python-list@python.org Subject: What is the difference between "ws.Messagebeep(1)" and "ws.Messagebee

Re: What is the difference between "ws.Messagebeep(1)" and "ws.Messagebeep(-1)" ?

2019-03-21 Thread Alexandre Brault
Assuming ws is winsound, MessageBeep(-1) produces a "simple beep". MessageBeep(1) doesn't seem to actually exist so it might fall back to that same "simple beep". The possible values are -1, MB_ICONASTERISK, MB_ICONEXCLAMATION, MB_ICONHAND, MB_ICONQUESTION, and MB_OK, all of which are defined in th

What is the difference between "ws.Messagebeep(1)" and "ws.Messagebeep(-1)" ?

2019-03-21 Thread Steve
Also: What is the code for other tones that I can call? Footnote: When someone asks "A penny for your thoughts" and you give your 2c worth, I wonder what happens to that other penny? TTKMAWAN -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread jfong
Peter Otten at 2017/4/12 UTC+8 PM 8:13:53 wrote: > I should add that you can write > > lr = [[1], [0]] > lx = [] > for i in range(len(lr)): > > ... lx = lr[i][:] > > ... lx.append(0) > > ... lr[i].append(1) > > ... lr.append(lx) > > ... > lr > >[[1, 1], [0, 1],

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread Peter Otten
jf...@ms4.hinet.net wrote: > Peter Otten at 2017/4/12 UTC+8 PM 4:41:36 wrote: >> jf...@ms4.hinet.net wrote: >> >> Assuming both x and y are lists >> >> x[:] = y >> >> replaces the items in x with the items in y while >> >> >> x = y[:] >> >> makes a copy of y and binds that to the name x. In

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread jfong
Peter Otten at 2017/4/12 UTC+8 PM 4:41:36 wrote: > jf...@ms4.hinet.net wrote: > > Assuming both x and y are lists > > x[:] = y > > replaces the items in x with the items in y while > > > x = y[:] > > makes a copy of y and binds that to the name x. In both cases x and y remain > different li

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread Peter Otten
jf...@ms4.hinet.net wrote: Assuming both x and y are lists x[:] = y replaces the items in x with the items in y while x = y[:] makes a copy of y and binds that to the name x. In both cases x and y remain different lists, but in only in the second case x is rebound. This becomes relevant wh

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread alister
On Wed, 12 Apr 2017 01:08:07 -0700, jfong wrote: > I have a list of list and like to expand each "list element" by > appending a 1 and a 0 to it. For example, from "lr = [[1], [0]]" expand > to "lr = [[1,1], [0,1], [1,0], [0,0]]". > > The following won't work: > > Python 3.4.4 (v3.4.4:737efcadf5

What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread jfong
I have a list of list and like to expand each "list element" by appending a 1 and a 0 to it. For example, from "lr = [[1], [0]]" expand to "lr = [[1,1], [0,1], [1,0], [0,0]]". The following won't work: Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win

Re: What is the difference between class Foo(): and class Date(object):

2016-11-21 Thread Veek M
Steve D'Aprano wrote: > On Mon, 21 Nov 2016 11:15 pm, Veek M wrote: > > class Foo(): >> ... pass >> ... > class Bar(Foo): >> ... pass >> ... > b = Bar() > type(b) >> > [...] > >> What is going on here? Shouldn't x = EuroDate(); type(x) give >> 'instance'?? Why is 'b' an 'inst

Re: What is the difference between class Foo(): and class Date(object):

2016-11-21 Thread Steve D'Aprano
On Mon, 21 Nov 2016 11:15 pm, Veek M wrote: class Foo(): > ... pass > ... class Bar(Foo): > ... pass > ... b = Bar() type(b) > [...] > What is going on here? Shouldn't x = EuroDate(); type(x) give > 'instance'?? Why is 'b' an 'instance' and 'x' EuroDate? > Why isn't 'b' B

What is the difference between class Foo(): and class Date(object):

2016-11-21 Thread Veek M
>>> class Foo(): ... pass ... >>> class Bar(Foo): ... pass ... >>> b = Bar() >>> type(b) >>> class Date(object): ... pass ... >>> class EuroDate(Date): ... pass ... >>> x = EuroDate() >>> type(x) What is going on here? Shouldn't x = EuroDate(); type(x) give 'instance'?? Why is 'b' an

Re: what is the difference between one-line-operation and 2-line-operation

2016-04-25 Thread Gary Herron
On 04/25/2016 07:13 AM, oyster wrote: for a simple code [code] vexList = [1, 2, 3] print('vexList', list(vexList)) vexList=map(lambda e: e+1, vexList) print('vexList', list(vexList)) vexList = list(vexList) print('vexList', list(vexList)) vexList=map(lambda e: e*2,vexList) print('vexList', lis

Re: what is the difference between one-line-operation and 2-line-operation

2016-04-25 Thread Michael Torrie
On 04/25/2016 08:13 AM, oyster wrote: > so, what produces this difference between py2 and py3 in nature? is > there more examples? where can I find the text abiut his difference? One thing I see is that both your py2 and py3 examples are treating print as a function. It's only a function in Py3.

Re: what is the difference between one-line-operation and 2-line-operation

2016-04-25 Thread Jussi Piitulainen
oyster writes: - - > I found > type(map(lambda e: e, vexList)) is in py2 > type(map(lambda e: e, vexList)) is in py3 > > so, what produces this difference between py2 and py3 in nature? is > there more examples? where can I find the text abiut his difference? Yes, there are more ways obtain o

what is the difference between one-line-operation and 2-line-operation

2016-04-25 Thread oyster
for a simple code [code] vexList = [1, 2, 3] print('vexList', list(vexList)) vexList=map(lambda e: e+1, vexList) print('vexList', list(vexList)) vexList = list(vexList) print('vexList', list(vexList)) vexList=map(lambda e: e*2,vexList) print('vexList', list(vexList)) [/code] py27 says [quote]

Re: What is the difference between list() and list?

2015-06-02 Thread John Gordon
In <3ada3275-68c9-421c-aa19-53c312c42...@googlegroups.com> fl writes: > I find the following results are interesting, but I don't know the difference > between list() and list. 'list()' invokes the list class, which creates and returns a new list. Since you haven't passed any arguments, the lis

Re: What is the difference between list() and list?

2015-06-02 Thread Joel Goldstick
On Tue, Jun 2, 2015 at 5:33 PM, fl wrote: > Hi, > > I find the following results are interesting, but I don't know the difference > between list() and list. > > > > > > nums=list() nums > [] xx=list xx > nums > [] print(xx) > print(nums) > [] > > > > Could

What is the difference between list() and list?

2015-06-02 Thread fl
Hi, I find the following results are interesting, but I don't know the difference between list() and list. >>> nums=list() >>> nums [] >>> xx=list >>> xx >>> nums [] >>> print(xx) >>> print(nums) [] >>> Could you tell me that? Thanks, -- https://mail.python.org/mailman/listinfo/pytho

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-08 Thread Chris Angelico
On Fri, May 8, 2015 at 9:53 PM, Dave Angel wrote: > One thing newbies get tripped up by is having some path through their code > that doesn't explicitly return. And in Python that path therefore returns > None. It's most commonly confusing when there are nested ifs, and one of > the "inner ifs"

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-08 Thread Dave Angel
On 05/08/2015 02:42 AM, Chris Angelico wrote: On Fri, May 8, 2015 at 4:36 PM, Rustom Mody wrote: On Friday, May 8, 2015 at 10:39:38 AM UTC+5:30, Chris Angelico wrote: Why have the concept of a procedure? On Friday, Chris Angelico ALSO wrote: With print(), you have a conceptual procedure...

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-07 Thread Chris Angelico
On Fri, May 8, 2015 at 4:36 PM, Rustom Mody wrote: > On Friday, May 8, 2015 at 10:39:38 AM UTC+5:30, Chris Angelico wrote: >> Why have the concept of a procedure? > > On Friday, Chris Angelico ALSO wrote: >> With print(), you have a conceptual procedure... > > So which do you want to stand by? A

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-07 Thread Rustom Mody
On Friday, May 8, 2015 at 10:39:38 AM UTC+5:30, Chris Angelico wrote: > Why have the concept of a procedure? On Friday, Chris Angelico ALSO wrote: > With print(), you have a conceptual procedure... So which do you want to stand by? Just to be clear I am not saying python should be any differen

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-07 Thread Chris Angelico
On Fri, May 8, 2015 at 2:53 PM, Rustom Mody wrote: > Yeah I know > And if python did not try to be so clever, I'd save some time with > student-surprises > >> In a program, an expression >> statement simply discards its result, whether it's None or 42 or >> [1,2,3] or anything else. You could writ

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-07 Thread Rustom Mody
On Friday, May 8, 2015 at 10:24:06 AM UTC+5:30, Rustom Mody wrote: > get is very much a function and the None return is semantically significant. > print is just round peg -- what you call conceptual function -- stuffed into > square hole -- function the only available syntax-category Sorry "Conc

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-07 Thread Rustom Mody
were more in the collective > >> > consciousness rather than C's travesty of function, things might not have > >> > been so messy. > >> > >> I'm not really sure that having distinct procedures, as opposed to > >> functions > >> that you just

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-07 Thread Chris Angelico
ings might not have >> > been so messy. >> >> I'm not really sure that having distinct procedures, as opposed to functions >> that you just ignore their return result, makes *such* a big difference. Can >> you explain what is the difference between these? &

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-07 Thread Rustom Mody
On Wednesday, May 6, 2015 at 6:41:38 PM UTC+5:30, Dennis Lee Bieber wrote: > On Tue, 5 May 2015 21:47:17 -0700 (PDT), Rustom Mody declaimed the following: > > >If the classic Pascal (or Fortran or Basic) sibling balanced abstractions of > >function-for-value > >procedure-for-effect were more in t

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-07 Thread Rustom Mody
-effect were more in the collective > > consciousness rather than C's travesty of function, things might not have > > been so messy. > > I'm not really sure that having distinct procedures, as opposed to functions > that you just ignore their return result, makes *such*

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Steven D'Aprano
ere more in the collective > consciousness rather than C's travesty of function, things might not have > been so messy. I'm not really sure that having distinct procedures, as opposed to functions that you just ignore their return result, makes *such* a big difference. Can you explain w

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Rustom Mody
On Tuesday, May 5, 2015 at 11:15:42 PM UTC+5:30, Marko Rauhamaa wrote: > Personally, I have never found futures a very useful idiom in any > language (Scheme, Java, Python). Or more to the point, concurrency and > the notion of a function don't gel well in my mind. Interesting comment. It strik

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Terry Reedy
On 5/5/2015 1:46 PM, Ian Kelly wrote: On Tue, May 5, 2015 at 9:22 AM, Paul Moore wrote: I'm working my way through the asyncio documentation. I have got to the "Tasks and coroutines" section, but I'm frankly confused as to the difference between the various things described in that section:

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Paul Moore
On Tuesday, 5 May 2015 18:48:09 UTC+1, Ian wrote: > Fundamentally, a future is a placeholder for something that isn't > available yet. You can use it to set a callback to be called when that > thing is available, and once it's available you can get that thing > from it. OK, that makes a lot of se

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Paul Moore
On Tuesday, 5 May 2015 17:11:39 UTC+1, Zachary Ware wrote: >On Tue, May 5, 2015 at 10:22 AM, Paul Moore wrote: >> I'm working my way through the asyncio documentation. I have got to the >> "Tasks and coroutines" section, but I'm frankly confused as to the >> difference between the various things

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Skip Montanaro
Paul> ... I'm frankly confused ... You and me both. I'm pretty sure I understand what a Future is, and until the long discussion about PEP 492 (?) started up, I thought I understood what a coroutine was from my days in school many years ago. Now I'm not so sure. Calling Dave Beazley... Calling Da

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Marko Rauhamaa
Paul Moore : > But I don't understand what a Future is. A future stands for a function that is scheduled to execute in the background. Personally, I have never found futures a very useful idiom in any language (Scheme, Java, Python). Or more to the point, concurrency and the notion of a functio

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Ian Kelly
On Tue, May 5, 2015 at 9:22 AM, Paul Moore wrote: > I'm working my way through the asyncio documentation. I have got to the > "Tasks and coroutines" section, but I'm frankly confused as to the difference > between the various things described in that section: coroutines, tasks, and > futures.

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Terry Reedy
On 5/5/2015 11:22 AM, Paul Moore wrote: I'm working my way through the asyncio documentation. I have got to the "Tasks and coroutines" section, but I'm frankly confused as to the difference between the various things described in that section: coroutines, tasks, and futures. I think can understa

Re: asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Zachary Ware
On Tue, May 5, 2015 at 10:22 AM, Paul Moore wrote: > I'm working my way through the asyncio documentation. I have got to the > "Tasks and coroutines" section, but I'm frankly confused as to the difference > between the various things described in that section: coroutines, tasks, and > futures.

asyncio: What is the difference between tasks, futures, and coroutines?

2015-05-05 Thread Paul Moore
I'm working my way through the asyncio documentation. I have got to the "Tasks and coroutines" section, but I'm frankly confused as to the difference between the various things described in that section: coroutines, tasks, and futures. I think can understand a coroutine. Correct me if I'm wrong,

Re: What is the difference between these two? (Assigning functions to variables)

2014-11-04 Thread Max Nathaniel Ho
On Wednesday, November 5, 2014 2:00:08 PM UTC+8, Cameron Simpson wrote: > On 04Nov2014 19:17, Max Nathaniel Ho wrote: > >Just to be clear, I was referring to these two lines > > > >greet = compose_greet_func() > > > >greet_someone = greet > > Please don't top-post. Thanks. > > Your first assignm

Re: What is the difference between these two? (Assigning functions to variables)

2014-11-04 Thread Cameron Simpson
On 04Nov2014 19:17, Max Nathaniel Ho wrote: Just to be clear, I was referring to these two lines greet = compose_greet_func() greet_someone = greet Please don't top-post. Thanks. Your first assignment: greet = compose_greet_func() _calls_ (runs) the compose_greet_func and assigns its re

Re: What is the difference between these two? (Assigning functions to variables)

2014-11-04 Thread Max Nathaniel Ho
Just to be clear, I was referring to these two lines greet = compose_greet_func() greet_someone = greet On Wednesday, November 5, 2014 11:15:46 AM UTC+8, Max Nathaniel Ho wrote: > Example 1 > > def compose_greet_func(): > def get_message(): > return "Hello there!" > > return

What is the difference between these two? (Assigning functions to variables)

2014-11-04 Thread Max Nathaniel Ho
Example 1 def compose_greet_func(): def get_message(): return "Hello there!" return get_message greet = compose_greet_func() print greet() Example 2 def greet(name): return "hello "+name greet_someone = greet print greet_someone("John" In Example 1, the function compoe_

Re: what is the difference between name and _name?

2014-08-21 Thread luofeiyu
I fix a mistake in Steven D'Aprano interpretation. class Person(object): def __init__(self, name): self._name = name def getName(self): print('fetch') return self._name def setName(self, value): print('change...') self._name = value

Re: what is the difference between name and _name?

2014-08-20 Thread Chris Angelico
On Thu, Aug 21, 2014 at 12:20 PM, luofeiyu wrote: > > all the expressions can not get the info "name property docs" ?how can i get > it? >>> Person.name.__doc__ 'name property docs' It's an attribute of the property, not of the result. ChrisA -- https://mail.python.org/mailman/listinfo/python-

Re: what is the difference between name and _name?

2014-08-20 Thread luofeiyu
one more question,how can i get the doc info? class Person(object): def __init__(self, name): self._name = name def getName(self): print('fetch') return self._name def setName(self, value): print('change...') self._name = value def delNa

Re: what is the difference between name and _name?

2014-08-20 Thread Steven D'Aprano
luofeiyu wrote: > So in this example: >>> class Person(object): >>> def __init__(self, name): >>> self._name = name >> [...] >>> name = property(getName, setName, delName, "name property docs") >> >> >> (3) name is the public attribute that other classes or functions

Re: what is the difference between name and _name?

2014-08-20 Thread Frank Millman
"luofeiyu" wrote in message news:53f48957.8020...@gmail.com... > So in this example: >>> class Person(object): >>> def __init__(self, name): >>> self._name = name >> [...] >>> name = property(getName, setName, delName, "name property docs") >> >> >> (3) name is the

Re: what is the difference between name and _name?

2014-08-20 Thread luofeiyu
So in this example: class Person(object): def __init__(self, name): self._name = name [...] name = property(getName, setName, delName, "name property docs") (3) name is the public attribute that other classes or functions are permitted to use. problem 1: ther

Re: what is the difference between name and _name?

2014-08-20 Thread Steven D'Aprano
On Wed, 20 Aug 2014 15:16:56 +0800, luofeiyu wrote: > When i learn property in python , i was confused by somename and > _somename,what is the difference between them? One name starts with underscore, the other does not. In names, an underscore is just a letter with no special meaning

Re: what is the difference between name and _name?

2014-08-20 Thread Ben Finney
luofeiyu writes: > When i learn property in python , i was confused by somename and > _somename,what is the difference between them? Some attributes are exposed in the API for an object (a class, a module, etc.). Those are effectively a promise from the author that the attribute is sup

what is the difference between name and _name?

2014-08-20 Thread luofeiyu
When i learn property in python , i was confused by somename and _somename,what is the difference between them? class Person(object): def __init__(self, name): self._name = name def getName(self): print('fetch') return self._name def setName(s

Re: What is the difference between matchObj.group() and matchObj.group(0)

2014-07-06 Thread MRAB
On 2014-07-06 19:26, rxjw...@gmail.com wrote: Hi, I cannot get the difference between matchObj.group() and matchObj.group(0), Although there definitions are obvious different. And group() mentions 'tuple'. tuple means all the elements in line object? Match Object Methods Description group(n

What is the difference between matchObj.group() and matchObj.group(0)

2014-07-06 Thread rxjwg98
Hi, I cannot get the difference between matchObj.group() and matchObj.group(0), Although there definitions are obvious different. And group() mentions 'tuple'. tuple means all the elements in line object? Match Object Methods Description group(num=0) This method returns entire match (or speci

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 13/05/14 02:09, Chris Angelico wrote: Sometimes you just want to confirm. :) Or maybe you want your program to be able to detect which it's on. There are ways of doing both, but sys.maxint isn't one of them, as it's specific to the int->long promotion of Py2. The OPs main mistake, I guess,

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 10:05 AM, Sturla Molden wrote: > On 11/05/14 08:56, Ross Gayler wrote: > >> Is that true?I have spent a couple of hours searching for a definitive >> description of the difference between the 32 and 64 bit versions of >> Python for Windows and haven't found anything. > > >

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread MRAB
On 2014-05-13 00:41, Sturla Molden wrote: On 12/05/14 15:42, Sturla Molden wrote: - A one-dimensional NumPy array with dtype np.float64 can keep 16 GB of data before a 32 bit index is too small and Python starts to use long. A two-dimensional NumPy array with dtype np.float64 can keep 256 GB of

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 11/05/14 08:56, Ross Gayler wrote: Is that true?I have spent a couple of hours searching for a definitive description of the difference between the 32 and 64 bit versions of Python for Windows and haven't found anything. Why do you care if a Python int object uses 32 or 64 bits internally?

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 12/05/14 15:42, Sturla Molden wrote: - A one-dimensional NumPy array with dtype np.float64 can keep 16 GB of data before a 32 bit index is too small and Python starts to use long. A two-dimensional NumPy array with dtype np.float64 can keep 256 GB of data before a 32 bit index is too small.

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-12 Thread Sturla Molden
On 11/05/14 08:56, Ross Gayler wrote: It looks to me as though 32 and 64 bit versions of Python on 64 bit Windows are both really 32 bit Python, differing only in how they interact with Windows. No! Pointers are 64 bit, Python integers (on Python 2.x) are 32 bit. Microsoft decided to use a 32

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-11 Thread Benjamin Kaplan
On Sat, May 10, 2014 at 11:56 PM, Ross Gayler wrote: > > Hi, > > I want to install Python on a PC with 16GB of RAM and the 64 bit version of > Windows 7. > I want Python to be able to use as much as possible of the RAM. > > When I install the 64 bit version of Python I find that sys.maxint == 2**

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-11 Thread Terry Reedy
On 5/11/2014 2:56 AM, Ross Gayler wrote: Hi, I want to install Python on a PC with 16GB of RAM and the 64 bit version of Windows 7. I want Python to be able to use as much as possible of the RAM. When I install the 64 bit version of Python I find that sys.maxint == 2**31 - 1 Since sys.maxint

What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-11 Thread Ross Gayler
Hi, I want to install Python on a PC with 16GB of RAM and the 64 bit version of Windows 7. I want Python to be able to use as much as possible of the RAM. When I install the 64 bit version of Python I find that sys.maxint == 2**31 - 1 Whereas the Pythpon installed on my 64 bit linux system retur

Re: what is the difference between commenting and uncommenting the __init__ method in this class?

2013-01-28 Thread Mitya Sirenef
On 01/28/2013 09:09 PM, iMath wrote: what is the difference between commenting and uncommenting the __init__ method in this class? > > > class CounterList(list): > counter = 0 > > ## def __init__(self, *args): > ## super(CounterList, self).__init__(*args) > >

Re: what is the difference between commenting and uncommenting the __init__ method in this class?

2013-01-28 Thread Dave Angel
On 01/28/2013 09:09 PM, iMath wrote: what is the difference between commenting and uncommenting the __init__ method in this class? class CounterList(list): counter = 0 ##def __init__(self, *args): ##super(CounterList, self).__init__(*args) def __getitem__(self, index

what is the difference between commenting and uncommenting the __init__ method in this class?

2013-01-28 Thread iMath
what is the difference between commenting and uncommenting the __init__ method in this class? class CounterList(list): counter = 0 ##def __init__(self, *args): ##super(CounterList, self).__init__(*args) def __getitem__(self, index): self.__class__

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-29 Thread Nobody
On Fri, 28 Sep 2012 11:48:23 -0600, Kristen J. Webb wrote: > NOTE: I am a C programmer and new to python, so can anyone comment > on what the st_ctime value is when os.stat() is called on Windows? The documentation[1] says: st_ctime - platform dependent; time of most recent metadata change o

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Kristen J. Webb
The Windows stat() call treats things differently, FROM: http://msdn.microsoft.com/en-us/library/14h5k7ff%28v=vs.80%29.aspx st_ctime Time of creation of file. Valid on NTFS but not on FAT formatted disk drives. I don't think that Windows has a concept of a "change time" for meta data (th

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Nobody
On Fri, 28 Sep 2012 06:12:35 -0700, 陈伟 wrote: > what is the difference between st_ctime and st_mtime one is the time of > last change and the other is the time of last modification, but i can > not understand what is the difference between 'change' and 'modification'

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Chris Angelico
On Sat, Sep 29, 2012 at 1:18 AM, Christian Heimes wrote: > Am 28.09.2012 17:07, schrieb Chris Angelico: > In the future please read the manual before replying! ;) You are wrong, > ctime is *not* the creation time. It's the change time of the inode. > It's updated whenever the inode is modified, e.

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Christian Heimes
Am 28.09.2012 17:07, schrieb Chris Angelico: > On Fri, Sep 28, 2012 at 11:12 PM, 陈伟 wrote: >> >> -- >> http://mail.python.org/mailman/listinfo/python-list > > In future, can you put the body of your message into the body please? :) > > ctime is creation time, not change time. mtime is modificati

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Chris Angelico
On Fri, Sep 28, 2012 at 11:12 PM, 陈伟 wrote: > > -- > http://mail.python.org/mailman/listinfo/python-list In future, can you put the body of your message into the body please? :) ctime is creation time, not change time. mtime is modification time, as you have. But I can understand where the confu

what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change' and

2012-09-28 Thread 陈伟
-- http://mail.python.org/mailman/listinfo/python-list

Re: what is the difference between @property and method

2012-02-10 Thread Zheng Li
Thank you On 2012/02/10, at 0:36, John Posner wrote: > On 2:59 PM, Devin Jeanpierre wrote: > > >> It is kind of funny that the docs don't ever explicitly say what a >> property is. http://docs.python.org/library/functions.html#property -- >> Devin > > Here's a writeup that does: > http://wiki

Re: what is the difference between @property and method

2012-02-09 Thread Terry Reedy
On 2/9/2012 10:36 AM, John Posner wrote: On 2:59 PM, Devin Jeanpierre wrote: It is kind of funny that the docs don't ever explicitly say what a property is. http://docs.python.org/library/functions.html#property -- Devin Here's a writeup that does: http://wiki.python.org/moin/AlternativeDesc

Re: Re: what is the difference between @property and method

2012-02-09 Thread John Posner
On 2:59 PM, Devin Jeanpierre wrote: > It is kind of funny that the docs don't ever explicitly say what a > property is. http://docs.python.org/library/functions.html#property -- > Devin Here's a writeup that does: http://wiki.python.org/moin/AlternativeDescriptionOfProperty -John -- http://m

Re: what is the difference between @property and method

2012-02-09 Thread Devin Jeanpierre
On Thu, Feb 9, 2012 at 3:50 AM, Zheng Li wrote: > class A(object): >@properymethod >def value1(self): > return 'value1' > >def value2(self): > return 'value2' > > what is the difference between value1 and value2. Ther

what is the difference between @property and method

2012-02-09 Thread Zheng Li
class A(object): @properymethod def value1(self): return 'value1' def value2(self): return 'value2' what is the difference between value1 and value2. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between "new Class()" and "Class()"?

2011-11-20 Thread Alan Gauld
On 20/11/11 21:16, Herman wrote: What is so special about the "new" operator? Assuming you mean the __new__() method? __new__() gets called when the class is being constructed, it returns the new instance. It is the real Pyhon constructor. As opposed to __init__() which is called after the

Re: What is the difference between "new Class()" and "Class()"?

2011-11-20 Thread Ben Finney
Herman writes: > What is so special about the "new" operator? It's special because Python doesn't have it. Can you refer us with a URL to the place where you've seen Python code containing a ‘new’ operator? -- \ “Fear him, which after he hath killed hath power to cast into | `\ hell

Re: What is the difference between "new Class()" and "Class()"?

2011-11-20 Thread Terry Reedy
On 11/20/2011 4:16 PM, Herman wrote: What is so special about the "new" operator? There is no 'new' operator in Python. Perhaps you are thinking of javascript or maybe jave or ...? -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

What is the difference between "new Class()" and "Class()"?

2011-11-20 Thread Herman
What is so special about the "new" operator? -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Terry Reedy
On 7/13/2011 10:19 AM, Anthony Kong wrote: One of the main difference is that pypy supports only R-Python, which stands for 'Restricted Python". Not true. PyPy is *written* in rpython. It runs standard Python. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Dan Stromberg
On Wed, Jul 13, 2011 at 8:18 AM, Ian Kelly wrote: > On Wed, Jul 13, 2011 at 8:19 AM, Anthony Kong > wrote: > > One of the main difference is that pypy supports only R-Python, which > stands > > for 'Restricted Python". > > It is a subset of C-python language. > > This is wrong. The PyPy *interp

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Anthony Kong
I stand corrected. Thanks Ian Cheers On Thu, Jul 14, 2011 at 1:18 AM, Ian Kelly wrote: > On Wed, Jul 13, 2011 at 8:19 AM, Anthony Kong > wrote: > > One of the main difference is that pypy supports only R-Python, which > stands > > for 'Restricted Python". > > It is a subset of C-python langua

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Ian Kelly
On Wed, Jul 13, 2011 at 8:19 AM, Anthony Kong wrote: > One of the main difference is that pypy supports only R-Python, which stands > for 'Restricted Python". > It is a subset of C-python language. This is wrong. The PyPy *interpreter* is written in RPython. At the application level, PyPy suppo

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread sturlamolden
On 13 Jul, 16:06, ArrC wrote: > And they also talked about the lack of type check in python. > > So, how does it help (strongly typed) in debugging? Python is strongly typed. There are no static type checks in Python. Type checks are done at runtime. Dynamic typing does not mean that Python is

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread ArrC
Thanks Chris, That was a nice brief explanation,but i got the point. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Chris Angelico
On Thu, Jul 14, 2011 at 12:06 AM, ArrC wrote: > So, i want to know what are the core diff btw PyPy and Python ? Python is a language; PyPy is one implementation of that language. The "classic" implementation of Python is CPython, not to be confused with Cython; there are a few others as well. If

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Anthony Kong
One of the main difference is that pypy supports only R-Python, which stands for 'Restricted Python". It is a subset of C-python language. See here for more info: http://codespeak.net/pypy/dist/pypy/doc/coding-guide.html#rpython-definition-not Cheers On Thu, Jul 14, 2011 at 12:06 AM, ArrC wrot

What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread ArrC
Hey guys,i am a python newbie, i just read a qustion on quora where it said that quora quys used pypy (and pylon) to develop quora. So, i want to know what are the core diff btw PyPy and Python ? And they also talked about the lack of type check in python. So, how does it help (strongly typed)

Re: What is the difference between 'type' and 'class'?

2010-06-22 Thread Duncan Booth
Peng Yu wrote: > pydoc xrange says: > > Help on class xrange in module __builtin__: > > class xrange(object) > > python_2.6.5_library.pdf says: > > Objects of type xrange are similar to buffers > > Are type and class synonyms? It seems that they are at least according > to some webpages that

Re: What is the difference between 'type' and 'class'?

2010-06-21 Thread Steven D'Aprano
On Mon, 21 Jun 2010 15:43:01 -0700, Stephen Hansen wrote: > many types are fundamentally immutable(i.e., ints, strings), and its > awful hard to make an immutable class. It's really simple if you can inherit from an existing immutable class. class K(tuple): pass Of course, that lets you ad

Re: What is the difference between 'type' and 'class'?

2010-06-21 Thread Terry Reedy
On 6/21/2010 6:11 PM, Peng Yu wrote: pydoc xrange says: Help on class xrange in module __builtin__: class xrange(object) python_2.6.5_library.pdf says: Objects of type xrange are similar to buffers Are type and class synonyms? It seems that they are at least according to some webpages that I

Re: What is the difference between 'type' and 'class'?

2010-06-21 Thread Stephen Hansen
On 6/21/10 3:11 PM, Peng Yu wrote: > Are type and class synonyms? It seems that they are at least according > to some webpages that I read. But I'm not completely sure. Could you > let me know in case my impress is wrong? Once upon a time, a type was something that was only built-in, provided by P

  1   2   >