Re: [Tutor] set current working dir

2015-03-17 Thread Dave Angel
On 03/16/2015 02:29 PM, Rajbir Singh wrote: i need to know how i can set current working dir in an executing phython using os module os.chdir() will change the current directory, but it changes it for the whole program (all threads), and the change lasts till the program terminates. Very of

Re: [Tutor] set current working dir

2015-03-16 Thread Ben Finney
Rajbir Singh writes: > i need to know how i can set current working dir in an executing > phython using os module Why must it be using the ‘os’ module? It's generally a bad idea to assume you need a specific module to provide the solution; better to describe what you need to do, and not assume w

Re: [Tutor] set current working dir

2015-03-16 Thread Oscar Benjamin
On 16 March 2015 at 18:29, Rajbir Singh wrote: > > i need to know how i can set current working dir in an executing phython > using os module If you explain why you want to do that then it may be that there is a better way to achieve what you want. It's usually not necessary to change the current

Re: [Tutor] set current working dir

2015-03-16 Thread Alan Gauld
On 16/03/15 18:29, Rajbir Singh wrote: i need to know how i can set current working dir in an executing phython using os module try os.chdir('/some/path/here') -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo

[Tutor] set current working dir

2015-03-16 Thread Rajbir Singh
i need to know how i can set current working dir in an executing phython using os module ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Set values from list as per user input

2014-05-21 Thread Alan Gauld
On 21/05/14 13:39, Shweta Kaushik wrote: Hi All, I am new to python. Please help me. I have to create one function which can set values sent by user from a list of values. For eg: I have a list having values between 1 to 100. List = ['1', '2', ... '100'] I have to write a function to set valu

Re: [Tutor] Set values from list as per user input

2014-05-21 Thread Dave Angel
Shweta Kaushik Wrote in message: > Hi All, > > I am new to python. Please help me. > I have to create one function which can set values sent by user from a list > of values. > > For eg: > I have a list having values between 1 to 100. > List = ['1', '2', ... '100'] > > I have to write a functi

Re: [Tutor] Set values from list as per user input

2014-05-21 Thread R. Alan Monroe
> take value 15 from list Hint: use square brackets to choose a particular item from a list. test = ['first', 'second', 'third'] test[0] would refer to 'first' for example. Alan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscri

Re: [Tutor] Set values from list as per user input

2014-05-21 Thread Shweta Kaushik
Hi All, I am new to python. Please help me. I have to create one function which can set values sent by user from a list of values. For eg: I have a list having values between 1 to 100. List = ['1', '2', ... '100'] I have to write a function to set values from the list based on user input. If u

Re: [Tutor] set locals

2013-12-19 Thread spir
On 12/18/2013 09:45 PM, Alan Gauld wrote: On 18/12/13 17:45, Mark Lawrence wrote: Can I be so bold as to ask how discussing metaclasses and __setattr__ on a tutor mailing list is going to help the newbie who's having problems with their "hello world" program? It won't, but the tutor list is a

Re: [Tutor] set locals

2013-12-18 Thread eryksun
On Wed, Dec 18, 2013 at 6:16 AM, spir wrote: > On 12/18/2013 12:07 PM, eryksun wrote: >> >> You need __setattr__ from the metaclass: >> >> >>> class C: pass >> ... >> >>> type(C).__setattr__(C, "baz", "BAZ") >> >>> C.baz >> 'BAZ' > > Oh, that makes sense: so, __setattr__ o

Re: [Tutor] set locals

2013-12-18 Thread Steven D'Aprano
On Wed, Dec 18, 2013 at 05:45:02PM +, Mark Lawrence wrote: > Can I be so bold as to ask how discussing metaclasses and __setattr__ on > a tutor mailing list is going to help the newbie who's having problems > with their "hello world" program? It's not just newbies who need tutoring. Sometim

Re: [Tutor] set locals

2013-12-18 Thread Alan Gauld
On 18/12/13 17:45, Mark Lawrence wrote: Can I be so bold as to ask how discussing metaclasses and __setattr__ on a tutor mailing list is going to help the newbie who's having problems with their "hello world" program? It won't, but the tutor list is also for experienced programmers new to Pyth

Re: [Tutor] set locals

2013-12-18 Thread Mark Lawrence
On 18/12/2013 11:16, spir wrote: On 12/18/2013 12:07 PM, eryksun wrote: On Wed, Dec 18, 2013 at 5:40 AM, spir wrote: C.__setattr__(C, "baz", "BAZ") which fails, for any reason, with TypeError: can't apply this __setattr__ to type object You need __setattr__ from the metaclass:

Re: [Tutor] set locals

2013-12-18 Thread spir
On 12/18/2013 11:51 AM, eryksun wrote: On Tue, Dec 17, 2013 at 10:52 AM, spir wrote: is it at all possible to set new vars (or any symbol) into an existing scope (typically locals())? scope[name] = value raises by me an error like: TypeError: 'mappingproxy' object does not support it

Re: [Tutor] set locals

2013-12-18 Thread spir
On 12/18/2013 12:07 PM, eryksun wrote: On Wed, Dec 18, 2013 at 5:40 AM, spir wrote: C.__setattr__(C, "baz", "BAZ") which fails, for any reason, with TypeError: can't apply this __setattr__ to type object You need __setattr__ from the metaclass: >>> class C: pass ...

Re: [Tutor] set locals

2013-12-18 Thread eryksun
On Wed, Dec 18, 2013 at 5:40 AM, spir wrote: > C.__setattr__(C, "baz", "BAZ") > which fails, for any reason, with > TypeError: can't apply this __setattr__ to type object You need __setattr__ from the metaclass: >>> class C: pass ... >>> type(C).__setattr__(C, "baz", "BAZ")

Re: [Tutor] set locals

2013-12-18 Thread eryksun
On Tue, Dec 17, 2013 at 10:52 AM, spir wrote: > is it at all possible to set new vars (or any symbol) into an existing scope > (typically locals())? > > scope[name] = value > raises by me an error like: > TypeError: 'mappingproxy' object does not support item assignment > > I guess 'mappin

Re: [Tutor] set locals

2013-12-18 Thread spir
On 12/18/2013 10:02 AM, Peter Otten wrote: spir wrote: [...] Like Steven I have no idea how you produced the mappingproxy. Are you trying to use a class as a namespace (in Python 3.3)? class A: pass ... A.__dict__["foo"] = "bar" Traceback (most recent call last): File "", line 1, in Type

Re: [Tutor] set locals

2013-12-18 Thread Peter Otten
spir wrote: > Hello, > > is it at all possible to set new vars (or any symbol) into an existing > scope (typically locals())? locals() normally contains a copy of the current namespace as a dict. Setting items is possible but only alters the dict and has no effect on the original namespace: >

Re: [Tutor] set locals

2013-12-17 Thread Steven D'Aprano
On Tue, Dec 17, 2013 at 04:52:25PM +0100, spir wrote: > Hello, > > is it at all possible to set new vars (or any symbol) into an existing > scope (typically locals())? In general, no. The only time that writing to locals() is guaranteed to work is when you are in the top-level scope and locals

[Tutor] set locals

2013-12-17 Thread spir
Hello, is it at all possible to set new vars (or any symbol) into an existing scope (typically locals())? scope[name] = value raises by me an error like: TypeError: 'mappingproxy' object does not support item assignment I guess 'mappingproxy' is the implementation name of a scope (her

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-04-09 Thread DoanVietTrungAtGmail
FWIW, I'd like to reverse my answer, and now I agree with Oscar's 29 Jan suggestion to make "Reply-to-tutor-list" the default. Lately, several times a tutor had to forward to the list an email meant for the list but sent to him only, by mistake. On the other hand, the wrote-to-1-person-but-mistake

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-01-29 Thread Nick W
My personal opinion (with whatever limited weight that has on this list since I've only answered a few questions - and probably half of them I've accidentally only sent to the op)/how I read it is that RFC 2822 actually allows lists to set reply-to header; by my view the list software is forwarding

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-01-29 Thread Albert-Jan Roskam
> > To summarize existing opinions on this matter: > > http://marc.merlins.org/netrants/listreplyto.html > > You might want to familiarize yourself with existing literature on the > matter before starting a new flame war. Hmmm... False alarm?   Page blocked  The page you've been trying to a

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-01-29 Thread Kushal Kumaran
Oscar Benjamin writes: > I have both sent and received messages on this list that went off-list > by mistake. It's an easy mistake to make that you use reply instead of > reply-all and then the message goes just to one person instead of the > whole list. > > This problem is not unique to the pyth

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-01-29 Thread Jonatán Guadamuz
El 29/01/2013, a las 04:14 a.m., Oscar Benjamin escribió: > I see the mailing list as being fundamentally a public message forum > and only very occasionally send an off-list message. > Often this means that the archives are incomplete, so that there is a > thread but the part of the thread wher

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-01-29 Thread DoanVietTrungAtGmail
On Tue, Jan 29, 2013 at 9:12 PM, Oscar Benjamin wrote: > If you don't mind my asking, do you send many off-list messages as > replies to on-list ones? > Oscar > For this list, I have sent 1 public reply and 2 private replies (to thank individual tutors). Both numbers are too small to have any sig

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-01-29 Thread Oscar Benjamin
On 29 January 2013 03:35, DoanVietTrungAtGmail wrote: > As a student user of this list, I prefer leaving the Reply-To field > unchanged. I like the fact that this means a deliberate decision is > required to send public emails. If you don't mind my asking, do you send many off-list messages as r

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-01-28 Thread DoanVietTrungAtGmail
As a student user of this list, I prefer leaving the Reply-To field unchanged. I like the fact that this means a deliberate decision is required to send public emails. Trung On Tue, Jan 29, 2013 at 12:17 PM, Steven D'Aprano wrote: > On 29/01/13 09:04, Oscar Benjamin wrote: > > One particular l

Re: [Tutor] Set Reply-To field to Tutor@python.org

2013-01-28 Thread Steven D'Aprano
On 29/01/13 09:04, Oscar Benjamin wrote: One particular list that I receive has recently made an administrative change so that, from now on, all emails have the "Reply-To" header set to the list address. This means that the default behaviour when replying to a message is that the reply goes to t

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-19 Thread eryksun
On Sat, Jan 19, 2013 at 7:24 AM, Albert-Jan Roskam wrote: > > But is Windows the only exception in the way that libraries are dealt with? > Or do DLLs also have a dynamic area? DLLs can have an embedded manifest. To solve the DLL Hell problem, Windows introduced side-by-side assemblies (WinSxS):

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-19 Thread eryksun
On Fri, Jan 18, 2013 at 4:07 PM, Albert-Jan Roskam wrote: > > Alan said: >> Support for changing environment variables on the fly is iffy in most >> languages and is not something I'd ever do lightly. > > If you put it that way... yes, I now realize that it could be (and in fact > is) really annoy

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-19 Thread Alan Gauld
On 19/01/13 12:24, Albert-Jan Roskam wrote: Thank you! I am getting a whole lot wiser wrt Linux. I checked 'man ld' and 'man ldconfig'. Especially the ld command is pretty extensive. The Rpath/Runpath solution seems nice in that no wrapper is needed (contrary to when one uses LD_LIBRARY_PATH).

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-19 Thread Albert-Jan Roskam
> On Thu, Jan 17, 2013 at 10:33 AM, Albert-Jan Roskam > wrote: >> >> The goal is to load the C libraries (dll, so, dylib, etc) that my program >> needs. >> >> Anyway, I looked up your two suggestions about library_dirs and >> runtime_library_dirs. What is meant by "at link time"? > > lib

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-18 Thread Albert-Jan Roskam
>> Thanks for your replies. os.putenv() may be easier than os.environ because, >> hopefully, it takes care of the OS-specific separators of the values >> (";" for Windows, ":" for Linux, others I don't > know > > I wouldn't count on it. Support for changing environment variables on the > fl

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread eryksun
On Thu, Jan 17, 2013 at 10:33 AM, Albert-Jan Roskam wrote: > > The goal is to load the C libraries (dll, so, dylib, etc) that my program > needs. > > Anyway, I looked up your two suggestions about library_dirs and > runtime_library_dirs. What is meant by "at link time"? library_dirs adds search p

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Alan Gauld
On 17/01/13 12:14, Albert-Jan Roskam wrote: Thanks for your replies. os.putenv() may be easier than os.environ because, > hopefully, it takes care of the OS-specific separators of the values > (";" for Windows, ":" for Linux, others I don't know I wouldn't count on it. Support for changing env

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Albert-Jan Roskam
Original Message - > From: eryksun > To: Albert-Jan Roskam > Cc: Python Mailing List > Sent: Thursday, January 17, 2013 3:21 PM > Subject: Re: [Tutor] Set LD_LIBRARY_PATH and equivalents > platform-independently > > On Wed, Jan 16, 2013 at 4:06 PM, Alb

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread eryksun
On Thu, Jan 17, 2013 at 7:14 AM, Albert-Jan Roskam wrote: > > Thanks for your replies. os.putenv() may be easier than os.environ because, > hopefully, it takes care of the OS-specific separators of the values (";" > for Windows, ":" for Linux, others I don't know but I'd guess they're all > ":").

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread eryksun
On Wed, Jan 16, 2013 at 4:06 PM, Albert-Jan Roskam wrote: > > Is there a builtin function that can set LD_LIBRARY_PATH or equivalents > platform-independently? It would be nice use such a function in a setup > script. Modifying LD_LIBRARY_PATH only affects child processes (ld.so caches the search

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Albert-Jan Roskam
> Subject: Re: [Tutor] Set LD_LIBRARY_PATH and equivalents > platform-independently > > On 01/16/2013 07:05 PM, Alan Gauld wrote: >> On 16/01/13 21:06, Albert-Jan Roskam wrote: >> >>> Is there a builtin function that can set LD_LIBRARY_PATH or equiva

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Alan Gauld
On 17/01/13 02:10, Dave Angel wrote: I don't recall enough about Windows to be sure whether putenv would work, but the environment variable Windows uses to search for DLL's is certainly not LD_LIBRARY_PATH If you check the code Albert is actually using different variables per platform. For Wi

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-16 Thread Dave Angel
On 01/16/2013 07:05 PM, Alan Gauld wrote: On 16/01/13 21:06, Albert-Jan Roskam wrote: Is there a builtin function that can set LD_LIBRARY_PATH or equivalents platform-independently? No. But there is putenv() in the os module. But how well it works across OS I'm not sure. I don't recall eno

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-16 Thread Alan Gauld
On 16/01/13 21:06, Albert-Jan Roskam wrote: Is there a builtin function that can set LD_LIBRARY_PATH or equivalents platform-independently? No. But there is putenv() in the os module. But how well it works across OS I'm not sure. HTH -- Alan G Author of the Learn to Program web site http://ww

[Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-16 Thread Albert-Jan Roskam
Hello, Is there a builtin function that can set LD_LIBRARY_PATH or equivalents platform-independently? It would be nice use such a function in a setup script. The code below illustrates what I mean, although it's entirely untested. import sys import os def setPath(loc):     """Set LD_LIBRARY_PA

Re: [Tutor] set the BETWEEN range in the SQL query using the python datetime function

2011-06-24 Thread Norman Khine
On Fri, Jun 24, 2011 at 1:31 PM, Christian Witts wrote: > On 2011/06/24 01:19 PM, Norman Khine wrote: > > thank you, it was simpler than what i was trying to do, here is the > revised version: > > http://pastie.org/2115586 > > one thing i am getting an error is on like 103, in that if, i change >

Re: [Tutor] set the BETWEEN range in the SQL query using the python datetime function

2011-06-24 Thread Christian Witts
On 2011/06/24 01:19 PM, Norman Khine wrote: thank you, it was simpler than what i was trying to do, here is the revised version: http://pastie.org/2115586 one thing i am getting an error is on like 103, in that if, i change (http://pastie.org/2115615): -plt.legend(('Income - GBP', 'Discounts',

Re: [Tutor] set the BETWEEN range in the SQL query using the python datetime function

2011-06-24 Thread Peter Otten
Norman Khine wrote: > thank you, it was simpler than what i was trying to do, here is the > revised version: > > http://pastie.org/2115586 > > one thing i am getting an error is on like 103, in that if, i change > (http://pastie.org/2115615): > > -plt.legend(('Income - GBP', 'Discounts', 'Googl

Re: [Tutor] set the BETWEEN range in the SQL query using the python datetime function

2011-06-24 Thread Norman Khine
thank you, it was simpler than what i was trying to do, here is the revised version: http://pastie.org/2115586 one thing i am getting an error is on like 103, in that if, i change (http://pastie.org/2115615): -plt.legend(('Income - GBP', 'Discounts', 'Google AdWords - GBP', 'Commission - %s GBP'

Re: [Tutor] set the BETWEEN range in the SQL query using the python datetime function

2011-06-24 Thread Peter Otten
Norman Khine wrote: > hello, i have this code http://pastie.org/2112997 > > but i am not sure how to make the date range so that i get a list > based on the daily totals not the results i am now getting: > > (2L, Decimal('173.958344'), Decimal('159.966349')) 2011-06-23 00:00:00 > 2011-06-23 23:5

[Tutor] set the BETWEEN range in the SQL query using the python datetime function

2011-06-23 Thread Norman Khine
hello, i have this code http://pastie.org/2112997 but i am not sure how to make the date range so that i get a list based on the daily totals not the results i am now getting: (2L, Decimal('173.958344'), Decimal('159.966349')) 2011-06-23 00:00:00 2011-06-23 23:59:59 (2L, Decimal('173.958344'), De

Re: [Tutor] set and sets.Set

2010-04-21 Thread Steven D'Aprano
On Thu, 22 Apr 2010 02:28:03 am Bala subramanian wrote: > Friends, > Someone please write me the difference between creating set with > set() and a sets.Set(). The sets module, including sets.Set(), were first introduced in Python 2.3 and is written in Python. The built-in set object was introdu

Re: [Tutor] set and sets.Set

2010-04-21 Thread wesley chun
> When sets were introduced to Python in version 2.3. they came as a separate > "sets" module. > > In version 2.6 built-in set/frozenset types replaced this module. 2.4 > So either way is OK for now, but the sets module might go away in a newer > version. agreed cheers, -- wesley - - - - - -

Re: [Tutor] set and sets.Set

2010-04-21 Thread bob gailer
On 4/21/2010 12:28 PM, Bala subramanian wrote: Friends, Someone please write me the difference between creating set with set() and a sets.Set(). When sets were introduced to Python in version 2.3. they came as a separate "sets" module. In version 2.6 built-in set/frozenset types replaced th

[Tutor] set and sets.Set

2010-04-21 Thread Bala subramanian
Friends, Someone please write me the difference between creating set with set() and a sets.Set(). >>> a=set([1,2,3]) >>> b=sets.Set([1,2,3]) >>> print a set([1, 2, 3]) >>> print b Set([1, 2, 3]) Thanks, Bala ___ Tutor maillist - Tutor@python.org To un

Re: [Tutor] set key to sort

2009-01-31 Thread Kent Johnson
On Sat, Jan 31, 2009 at 4:51 AM, prasad rao wrote: > hell > I got a problem sorting a list of lists. > ml= > [[112, 'p'], [114, 'r'], [97, 'a'], [115, 's'], [97, 'a'], [100, 'd'], [97, > 'a'], [114, 'r'], [97, 'a'], [111, 'o']] > sorted(ml,key=?) > How can I formulate a key to sort based on the fi

Re: [Tutor] set key to sort

2009-01-31 Thread Sander Sweers
On Sat, Jan 31, 2009 at 10:51, prasad rao wrote: > I got a problem sorting a list of lists. > ml= > [[112, 'p'], [114, 'r'], [97, 'a'], [115, 's'], [97, 'a'], [100, 'd'], [97, > 'a'], [114, 'r'], [97, 'a'], [111, 'o']] > sorted(ml,key=?) > How can I formulate a key to sort based on the first eleme

[Tutor] set key to sort

2009-01-31 Thread prasad rao
hellI got a problem sorting a list of lists. ml= [[112, 'p'], [114, 'r'], [97, 'a'], [115, 's'], [97, 'a'], [100, 'd'], [97, 'a'], [114, 'r'], [97, 'a'], [111, 'o']] sorted(ml,key=?) How can I formulate a key to sort based on the first element of each list. sorting list of lists might have been d

Re: [Tutor] Set changing order of items?

2007-01-21 Thread Adam Cripps
On 1/20/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > Adam Cripps wrote: > > Many thanks all - I've got there in the end, using a tuple inside a > > set, ditching the question number and then rendering the sum for > > output in my main gui module. > > > > However, this does raise another issue now

Re: [Tutor] Set changing order of items?

2007-01-20 Thread Kent Johnson
Adam Cripps wrote: > Many thanks all - I've got there in the end, using a tuple inside a > set, ditching the question number and then rendering the sum for > output in my main gui module. > > However, this does raise another issue now (which I had thought would > happen, but was putting it off unt

Re: [Tutor] Set changing order of items?

2007-01-20 Thread Adam Cripps
On 1/20/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > Adam Cripps wrote: > > On 1/19/07, Simon Brunning <[EMAIL PROTECTED]> wrote: > >> On 1/19/07, Adam Cripps <[EMAIL PROTECTED]> wrote: > >>> I'm adding strings to a Set to prevent duplicates. However, the > >>> strings are meant to be in the corre

Re: [Tutor] Set changing order of items?

2007-01-19 Thread Kent Johnson
Adam Cripps wrote: > On 1/19/07, Simon Brunning <[EMAIL PROTECTED]> wrote: >> On 1/19/07, Adam Cripps <[EMAIL PROTECTED]> wrote: >>> I'm adding strings to a Set to prevent duplicates. However, the >>> strings are meant to be in the correct order. When I add the string to >>> the Set, the order seem

Re: [Tutor] Set changing order of items?

2007-01-19 Thread Python
On Fri, 2007-01-19 at 20:05 +, Adam Cripps wrote: > On 1/19/07, Simon Brunning <[EMAIL PROTECTED]> wrote: > > On 1/19/07, Adam Cripps <[EMAIL PROTECTED]> wrote: > > > I'm adding strings to a Set to prevent duplicates. However, the > > > strings are meant to be in the correct order. When I add t

Re: [Tutor] Set changing order of items?

2007-01-19 Thread Danny Yoo
On Fri, 19 Jan 2007, Adam Cripps wrote: > I'm adding strings to a Set to prevent duplicates. However, the strings > are meant to be in the correct order. When I add the string to the Set, > the order seems to change (and I don't seem to be able to predict what > order they are in). Hi Adam,

Re: [Tutor] Set changing order of items?

2007-01-19 Thread Adam Cripps
On 1/19/07, Simon Brunning <[EMAIL PROTECTED]> wrote: > On 1/19/07, Adam Cripps <[EMAIL PROTECTED]> wrote: > > I'm adding strings to a Set to prevent duplicates. However, the > > strings are meant to be in the correct order. When I add the string to > > the Set, the order seems to change (and I don

Re: [Tutor] Set changing order of items?

2007-01-19 Thread Simon Brunning
On 1/19/07, Adam Cripps <[EMAIL PROTECTED]> wrote: > I'm adding strings to a Set to prevent duplicates. However, the > strings are meant to be in the correct order. When I add the string to > the Set, the order seems to change (and I don't seem to be able to > predict what order they are in). Sets

[Tutor] Set changing order of items?

2007-01-19 Thread Adam Cripps
I'm adding strings to a Set to prevent duplicates. However, the strings are meant to be in the correct order. When I add the string to the Set, the order seems to change (and I don't seem to be able to predict what order they are in). The string is a simple addition question which should look like

Re: [Tutor] set(...)

2005-03-17 Thread Danny Yoo
> I use: > > Python 2.3.4 (#2, Aug 19 2004, 15:49:40) [GCC 3.4.1 (Mandrakelinux (Alpha > 3.4.1-3mdk)] on linux2 ... IDLE 1.0.3 > > I wa

[Tutor] set(...)

2005-03-17 Thread Przemyslaw Kisicki
I use: Python 2.3.4 (#2, Aug 19 2004, 15:49:40) [GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)] on linux2 ... IDLE 1.0.3 I was trying to wr