ANN: eGenix pyOpenSSL Distribution 0.13.5

2014-10-24 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.13.5 An easy-to-install and easy-to-use distribution of the pyOpenSSL Python interface for

pytest-2.6.4: bugfix release

2014-10-24 Thread holger krekel
Hi all, just pushed pytest-2.6.4 to pypi, a small bug fix release. pytest is a popular and mature Python testing tool with more than a 1100 tests against itself, passing on many different interpreters and platforms. This release is drop-in compatible to 2.5.2 and 2.6.X. See below for the

devpi-{server-2.1.2,web-2.2.1}: bugfixes, streamlined web templates

2014-10-24 Thread holger krekel
devpi-server-2.1.2 and devpi-web-2.2.1 bring a host of fixes to the private pypi server system. You can upgrade without migrating your data if you run already with devpi-server-2.1.X. Find docs as usual at: http://doc.devpi.net Many thanks to Florian Schulze who did most of the changes

Re: (test) ? a:b

2014-10-24 Thread ast
48K? Luxury! ZX81 had an option for 64K -- https://mail.python.org/mailman/listinfo/python-list

Re: I am out of trial and error again Lists

2014-10-24 Thread Mark Lawrence
On 22/10/2014 21:30, Seymore4Head wrote: def nametonumber(name): lst=[] for x,y in enumerate (name): lst=lst.append(y) print (lst) return (lst) a=[1-800-getcharter] print (nametonumber(a))#18004382427837 The syntax for when to use a () and when to use [] still

Re: When to use assert

2014-10-24 Thread Steven D'Aprano
Dan Stromberg wrote: I like to use assertions and if cond: raise ValueError('foo') a lot. I think Eiffel may be the poster-child for a language with pre-conditions, post-conditions and assertions. Yes. I don't think Eiffel is the only language with explicit support for testing invariants,

ANN: eGenix pyOpenSSL Distribution 0.13.5

2014-10-24 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.13.5 An easy-to-install and easy-to-use distribution of the pyOpenSSL Python interface for

Re: I am out of trial and error again Lists

2014-10-24 Thread Mark Lawrence
On 24/10/2014 08:05, Mark Lawrence wrote: On 22/10/2014 21:30, Seymore4Head wrote: def nametonumber(name): lst=[] for x,y in enumerate (name): lst=lst.append(y) print (lst) return (lst) a=[1-800-getcharter] print (nametonumber(a))#18004382427837 The syntax for

Re: When to use assert

2014-10-24 Thread Chris Angelico
On Fri, Oct 24, 2014 at 6:49 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: addresses = [get_address(name) for name in database] assert all(address for address in addresses) # ... much later on ... for i, address in enumerate(addresses): if some_condition():

Re: (test) ? a:b

2014-10-24 Thread Steven D'Aprano
Marko Rauhamaa wrote: BartC b...@freeuk.com: Ah, but what would x = [f, g][cond]() produce? It will select f or g (which should refer to functions), and call one of those depending on cond. That's not a problem. The problem is it will still evaluate both f and g, That's not really

Re: (test) ? a:b

2014-10-24 Thread Chris Angelico
On Fri, Oct 24, 2014 at 7:38 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Of course one can write hard-to-read code using any idiom by sheer weight of complexity or obfuscated naming: value = [some_function(arg)[23]['key'] or another_function.method((x +

Re: (test) ? a:b

2014-10-24 Thread Marko Rauhamaa
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: So why is it hard to read when the index is a flag? value = [f, g][cond]() So, subjectively, which syntax would you prefer: if j 10: j += 1 else: j = 3 or: j = j + 1 if j 10 else 3 or: j = (lambda: 3,

Re: setuptools + data_files = 2

2014-10-24 Thread luc2
On 2014-10-23, Simon Kennedy sffjun...@gmail.com wrote: If you're creating an sdist then you'll need to create a MANIFEST.in file in the same folder as setup.py with the following contents include share/test_file.txt If you're creating a bdist (egg or wheel) the parameter name you need

Re: (test) ? a:b

2014-10-24 Thread Steven D'Aprano
Marko Rauhamaa wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: So why is it hard to read when the index is a flag? value = [f, g][cond]() So, subjectively, which syntax would you prefer: Depends on what else the code is doing. But my personal preference is a red herring:

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Thu, 23 Oct 2014 21:56:31 -0700 (PDT), Rustom Mody rustompm...@gmail.com wrote: On Thursday, October 23, 2014 10:33:57 PM UTC+5:30, Seymore4Head wrote: On Thu, 23 Oct 2014 15:55:35 + (UTC), Denis McMahon wrote: On Thu, 23 Oct 2014 10:04:56 -0400, Seymore4Head wrote: On Thu, 23 Oct

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 08:05:01 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 22/10/2014 21:30, Seymore4Head wrote: def nametonumber(name): lst=[] for x,y in enumerate (name): lst=lst.append(y) print (lst) return (lst) a=[1-800-getcharter] print

Re: I am out of trial and error again Lists

2014-10-24 Thread Chris Angelico
On Sat, Oct 25, 2014 at 1:38 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: I tried list(range(10) I thought that would work in Python 3. It didn't. This is your problem: You say it didn't work. That is almost *never* the right thing to say or to think. What happened when you tried

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 09:12:28 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 24/10/2014 08:05, Mark Lawrence wrote: On 22/10/2014 21:30, Seymore4Head wrote: def nametonumber(name): lst=[] for x,y in enumerate (name): lst=lst.append(y) print (lst) return

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Sat, 25 Oct 2014 01:51:41 +1100, Chris Angelico ros...@gmail.com wrote: On Sat, Oct 25, 2014 at 1:38 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: I tried list(range(10) I thought that would work in Python 3. It didn't. This is your problem: You say it didn't work. That is almost

Re: I am out of trial and error again Lists

2014-10-24 Thread Chris Angelico
On Sat, Oct 25, 2014 at 2:04 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: I understand that it makes it easier for you if I can describe better the error I get, but by the time I ask for help here I have tried many different things to get the error to go away. That's part of the

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
On Friday, October 24, 2014 8:11:12 PM UTC+5:30, Seymore4Head wrote: On Thu, 23 Oct 2014 21:56:31 -0700 (PDT), Rustom Mody wrote: On Thursday, October 23, 2014 10:33:57 PM UTC+5:30, Seymore4Head wrote: On Thu, 23 Oct 2014 15:55:35 + (UTC), Denis McMahon wrote: On Thu, 23 Oct 2014

Re: I am out of trial and error again Lists

2014-10-24 Thread giacomo boffi
ERRATA CORRIGE: many different circumstances, by the very, very helpful folks of clp. many different circumstances, by the very, very helpful folks of clpy -- sapete contare fino a venticinque? Olimpia Milano Jugoplastika Split Partizan Beograd Roberto Premier Duska Ivanovic Zarko Paspalj --

Re: I am out of trial and error again Lists

2014-10-24 Thread Ian Kelly
On Fri, Oct 24, 2014 at 9:56 AM, Rustom Mody rustompm...@gmail.com wrote: Range(10) stores the min max values and loads each number in between when needed. It loads?? As in 'load-up-a-van'?? As in loads into memory. When you see: 10 10 1. Does someone (a clerk maybe) in the computer

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 08:56:31 -0700 (PDT), Rustom Mody rustompm...@gmail.com wrote: On Friday, October 24, 2014 8:11:12 PM UTC+5:30, Seymore4Head wrote: On Thu, 23 Oct 2014 21:56:31 -0700 (PDT), Rustom Mody wrote: On Thursday, October 23, 2014 10:33:57 PM UTC+5:30, Seymore4Head wrote: On

Re: I am out of trial and error again Lists

2014-10-24 Thread Albert-Jan Roskam
- On Fri, Oct 24, 2014 5:56 PM CEST Rustom Mody wrote: On Friday, October 24, 2014 8:11:12 PM UTC+5:30, Seymore4Head wrote: On Thu, 23 Oct 2014 21:56:31 -0700 (PDT), Rustom Mody wrote: On Thursday, October 23, 2014 10:33:57 PM UTC+5:30, Seymore4Head wrote: On

Re: I am out of trial and error again Lists

2014-10-24 Thread Chris Angelico
On Sat, Oct 25, 2014 at 3:37 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: When I use list(range(10)) I get: Traceback (most recent call last): File C:/Functions/name to number digit.py, line 37, in module print (nametonumber(a))#1800 438 2427 837 File C:/Functions/name to

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
Totally befuddled myself! Are you deliberately misspelling list to lst and hoping the error will go away. And Puh LEESE dont post screen shots of good ol ASCII text -- https://mail.python.org/mailman/listinfo/python-list

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
On Friday, October 24, 2014 10:18:12 PM UTC+5:30, Chris Angelico wrote: On Sat, Oct 25, 2014 at 3:37 AM, Seymore4Head wrote: When I use list(range(10)) I get: Traceback (most recent call last): File C:/Functions/name to number digit.py, line 37, in module print

Re: I am out of trial and error again Lists

2014-10-24 Thread Ian Kelly
On Fri, Oct 24, 2014 at 10:37 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: If I could explain to you why something doesn't work then I could fix it myself. I don't understand why it doesn't work. The best I can do is repost the code. You don't need to be able to explain why it

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Sat, 25 Oct 2014 03:47:51 +1100, Chris Angelico ros...@gmail.com wrote: On Sat, Oct 25, 2014 at 3:37 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: When I use list(range(10)) I get: Traceback (most recent call last): File C:/Functions/name to number digit.py, line 37, in module

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 09:54:23 -0700 (PDT), Rustom Mody rustompm...@gmail.com wrote: Totally befuddled myself! Are you deliberately misspelling list to lst and hoping the error will go away. And Puh LEESE dont post screen shots of good ol ASCII text I didn't do that on purpose. I make a lot of

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
On Friday, October 24, 2014 10:06:47 PM UTC+5:30, Ian wrote: On Fri, Oct 24, 2014 at 9:56 AM, Rustom Mody wrote: Range(10) stores the min max values and loads each number in between when needed. It loads?? As in 'load-up-a-van'?? As in loads into memory. When you see: 10 10

Re: I am out of trial and error again Lists

2014-10-24 Thread Chris Angelico
On Sat, Oct 25, 2014 at 4:05 AM, Ian Kelly ian.g.ke...@gmail.com wrote: The name of the builtin is list. It's a function* that takes an argument and uses it to construct a list, which it returns. *Actually it's a type object, and calling it causes an instance of the type to be constructed,

Re: I am out of trial and error again Lists

2014-10-24 Thread Albert Visser
On Fri, 24 Oct 2014 19:03:47 +0200, Seymore4Head Seymore4Head@hotmail.invalid wrote: http://i.imgur.com/DTc5zoL.jpg The interpreter. I don't know how to use that either. It's what's on the left hand side of your screenshot. You can simply type Python statements following the prompt

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
On Friday, October 24, 2014 10:37:45 PM UTC+5:30, Seymore4Head wrote: On Fri, 24 Oct 2014 09:54:23 -0700 (PDT), Rustom Mody wrote: Totally befuddled myself! Are you deliberately misspelling list to lst and hoping the error will go away. And Puh LEESE dont post screen shots of good ol

Re: (test) ? a:b

2014-10-24 Thread Dan Stromberg
On Fri, Oct 24, 2014 at 1:38 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I don't get why that's considered hard to read. So why is it hard to read when the index is a flag? value = [f, g][cond]() It's clear to you, it's clear to me, but is it clear to everyone? I very

Re: (test) ? a:b

2014-10-24 Thread Tobiah
On 10/22/2014 01:29 AM, ast wrote: Hello Is there in Python something like: j = (j = 10) ? 3 : j+1; as in C language ? thx Out of all of the replies, I don't think anyone actually offered the answer: a if condition else b -- https://mail.python.org/mailman/listinfo/python-list

Re: (test) ? a:b

2014-10-24 Thread Chris Angelico
On Sat, Oct 25, 2014 at 4:23 AM, Tobiah t...@tobiah.org wrote: Out of all of the replies, I don't think anyone actually offered the answer: a if condition else b Jean-Michel did, the very first response. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 19:18:12 +0200, Albert Visser albert.vis...@gmail.com wrote: On Fri, 24 Oct 2014 19:03:47 +0200, Seymore4Head Seymore4Head@hotmail.invalid wrote: http://i.imgur.com/DTc5zoL.jpg The interpreter. I don't know how to use that either. It's what's on the left hand side

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
On Friday, October 24, 2014 10:55:44 PM UTC+5:30, Seymore4Head wrote: On Fri, 24 Oct 2014 19:18:12 +0200, Albert Visser wrote: On Fri, 24 Oct 2014 19:03:47 +0200, Seymore4Head wrote: http://i.imgur.com/DTc5zoL.jpg The interpreter. I don't know how to use that either. It's

Re: I am out of trial and error again Lists

2014-10-24 Thread Ian Kelly
On Fri, Oct 24, 2014 at 11:03 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: Actually I was a little frustrated when I added that line back in as the other lines all work. Using list(range(10)) Doesn't throw an error but it doesn't work. http://i.imgur.com/DTc5zoL.jpg The interpreter.

Re: (-1)**1000

2014-10-24 Thread Dave Angel
Terry Reedy tjre...@udel.edu Wrote in message: On 10/22/2014 4:27 AM, ast wrote: Hello If i am writing (-1)**1000 on a python program, will the interpreter do (-1)*(-1)*...*(-1) or something clever ? The answer depends on the implementation. In fact i have (-1)**N with N an integer

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 10:42:08 -0700 (PDT), Rustom Mody rustompm...@gmail.com wrote: On Friday, October 24, 2014 10:55:44 PM UTC+5:30, Seymore4Head wrote: On Fri, 24 Oct 2014 19:18:12 +0200, Albert Visser wrote: On Fri, 24 Oct 2014 19:03:47 +0200, Seymore4Head wrote:

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 11:52:15 -0600, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Oct 24, 2014 at 11:03 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: Actually I was a little frustrated when I added that line back in as the other lines all work. Using list(range(10)) Doesn't throw an

Re: (test) ? a:b

2014-10-24 Thread Ian Kelly
On Fri, Oct 24, 2014 at 7:07 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info if j 10: j += 1 else: j = 3 or: j = j + 1 if j 10 else 3 or: j = (lambda: 3, lambda: j + 1)[j 10]() Certainly not the third one. That's needlessly obfuscated for

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
I meant to type: if y in range(1,10) doesn't work. Sigh Sorry On Fri, 24 Oct 2014 14:15:13 -0400, Seymore4Head Seymore4Head@Hotmail.invalid wrote: On Fri, 24 Oct 2014 11:52:15 -0600, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Oct 24, 2014 at 11:03 AM, Seymore4Head

Re: I am out of trial and error again Lists

2014-10-24 Thread Mark Lawrence
On 24/10/2014 18:03, Seymore4Head wrote: Actually I was a little frustrated when I added that line back in as the other lines all work. Using list(range(10)) Doesn't throw an error but it doesn't work. http://i.imgur.com/DTc5zoL.jpg The interpreter. I don't know how to use that either.

Re: (test) ? a:b

2014-10-24 Thread Tobiah
On 10/24/2014 10:27 AM, Chris Angelico wrote: On Sat, Oct 25, 2014 at 4:23 AM, Tobiah t...@tobiah.org wrote: Out of all of the replies, I don't think anyone actually offered the answer: a if condition else b Jean-Michel did, the very first response. ChrisA I had to search for it.

Re: I am out of trial and error again Lists

2014-10-24 Thread Mark Lawrence
On 24/10/2014 19:20, Seymore4Head wrote: I meant to type: if y in range(1,10) doesn't work. Sigh Sorry How many more times, state what you expect to happen and what actually happens. doesn't work is useless. Please read this http://sscce.org/ -- My fellow Pythonistas, ask not what our

Re: (test) ? a:b

2014-10-24 Thread Marko Rauhamaa
Ian Kelly ian.g.ke...@gmail.com: j = (lambda: 3, lambda: j + 1)[j 10]() Yes, the lambda approach falls victim to function calls being slow. That's just a deficiency in the compiler. There's nothing there that prevents the optimizer from translating the expression into the equivalent if

Re: I am out of trial and error again Lists

2014-10-24 Thread sohcahtoa82
On Friday, October 24, 2014 11:17:53 AM UTC-7, Seymore4Head wrote: On Fri, 24 Oct 2014 11:52:15 -0600, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Oct 24, 2014 at 11:03 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: Actually I was a little frustrated when I added that line back in

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 19:40:39 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 24/10/2014 19:20, Seymore4Head wrote: I meant to type: if y in range(1,10) doesn't work. Sigh Sorry How many more times, state what you expect to happen and what actually happens. doesn't work is useless.

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 11:57:12 -0700 (PDT), sohcahto...@gmail.com wrote: On Friday, October 24, 2014 11:17:53 AM UTC-7, Seymore4Head wrote: On Fri, 24 Oct 2014 11:52:15 -0600, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Oct 24, 2014 at 11:03 AM, Seymore4Head Seymore4Head@hotmail.invalid

Re: I am out of trial and error again Lists

2014-10-24 Thread sohcahtoa82
On Friday, October 24, 2014 12:12:10 PM UTC-7, Seymore4Head wrote: On Fri, 24 Oct 2014 11:57:12 -0700 (PDT), sohcahto...@gmail.com wrote: On Friday, October 24, 2014 11:17:53 AM UTC-7, Seymore4Head wrote: On Fri, 24 Oct 2014 11:52:15 -0600, Ian Kelly ian.g.ke...@gmail.com wrote: On

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 12:25:33 -0700 (PDT), sohcahto...@gmail.com wrote: On Friday, October 24, 2014 12:12:10 PM UTC-7, Seymore4Head wrote: On Fri, 24 Oct 2014 11:57:12 -0700 (PDT), sohcahto...@gmail.com wrote: On Friday, October 24, 2014 11:17:53 AM UTC-7, Seymore4Head wrote: On Fri, 24 Oct

Re: I am out of trial and error again Lists

2014-10-24 Thread sohcahtoa82
On Friday, October 24, 2014 12:36:23 PM UTC-7, Seymore4Head wrote: On Fri, 24 Oct 2014 12:25:33 -0700 (PDT), sohcahto...@gmail.com wrote: On Friday, October 24, 2014 12:12:10 PM UTC-7, Seymore4Head wrote: On Fri, 24 Oct 2014 11:57:12 -0700 (PDT), sohcahto...@gmail.com wrote: On Friday,

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 12:55:19 -0700 (PDT), sohcahto...@gmail.com wrote: On Friday, October 24, 2014 12:36:23 PM UTC-7, Seymore4Head wrote: On Fri, 24 Oct 2014 12:25:33 -0700 (PDT), sohcahto...@gmail.com wrote: On Friday, October 24, 2014 12:12:10 PM UTC-7, Seymore4Head wrote: On Fri, 24 Oct

Re: I am out of trial and error again Lists

2014-10-24 Thread Denis McMahon
On Fri, 24 Oct 2014 10:38:31 -0400, Seymore4Head wrote: I tried list(range(10) This is missing a ) It probably sat there waiting for you to finish the line. list(range(10)) You have two ( in the line, you need two ) to match them. I thought that would work in Python 3. It didn't. It

Re: (test) ? a:b

2014-10-24 Thread alister
On Fri, 24 Oct 2014 10:20:30 -0700, Dan Stromberg wrote: On Fri, Oct 24, 2014 at 1:38 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I don't get why that's considered hard to read. So why is it hard to read when the index is a flag? value = [f, g][cond]() It's clear to

Re: (test) ? a:b

2014-10-24 Thread Marko Rauhamaa
alister alister.nospam.w...@ntlworld.com: a = value if condition else another Value is instantly obvious (at least to a native English speaker anyway) And you can go further down that road. For example, you could say things like: die unless everything is OK Marko --

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 20:37:31 + (UTC), Denis McMahon denismfmcma...@gmail.com wrote: On Fri, 24 Oct 2014 10:38:31 -0400, Seymore4Head wrote: I tried list(range(10) This is missing a ) It probably sat there waiting for you to finish the line. list(range(10)) You have two ( in the line,

Re: I am out of trial and error again Lists

2014-10-24 Thread alister
On Fri, 24 Oct 2014 16:58:00 -0400, Seymore4Head wrote: On Fri, 24 Oct 2014 20:37:31 + (UTC), Denis McMahon denismfmcma...@gmail.com wrote: On Fri, 24 Oct 2014 10:38:31 -0400, Seymore4Head wrote: I tried list(range(10) This is missing a ) It probably sat there waiting for you to

Re: I am out of trial and error again Lists

2014-10-24 Thread mm0fmf
On 24/10/2014 15:47, Seymore4Head wrote: I have at least 10 ebooks. I will get around to reading them soon. Sooner would be better. -- https://mail.python.org/mailman/listinfo/python-list

Re: I am out of trial and error again Lists

2014-10-24 Thread Ian Kelly
On Fri, Oct 24, 2014 at 2:58 PM, Seymore4Head Seymore4Head@hotmail.invalid wrote: name=123-xyz-abc for x in name: if x in range(10): print (Range,(x)) if x in str(range(10)): print (String range,(x)) It doesn't throw an error but it doesn't print what you would

Re: I am out of trial and error again Lists

2014-10-24 Thread Denis McMahon
On Fri, 24 Oct 2014 14:15:13 -0400, Seymore4Head wrote: I do understand that. 7 is a number and 7 is a string. What my question was...and still is...is why Python 3 fails when I try using y=1 800 get charter y in range str(range(10)) should work because y is a string and str(range(10))

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 21:19:22 + (UTC), Denis McMahon denismfmcma...@gmail.com wrote: On Fri, 24 Oct 2014 14:15:13 -0400, Seymore4Head wrote: I do understand that. 7 is a number and 7 is a string. What my question was...and still is...is why Python 3 fails when I try using y=1 800 get

Re: I am out of trial and error again Lists

2014-10-24 Thread Denis McMahon
On Fri, 24 Oct 2014 10:38:31 -0400, Seymore4Head wrote: Thanks everyone for your suggestions. Try loading the following in codeskulptor: http://www.codeskulptor.org/#user38_j6kGKgeOMr_0.py -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: I am out of trial and error again Lists

2014-10-24 Thread Denis McMahon
On Fri, 24 Oct 2014 15:07:06 -0400, Seymore4Head wrote: On Fri, 24 Oct 2014 19:40:39 +0100, Mark Lawrence breamore...@yahoo.co.uk wrote: On 24/10/2014 19:20, Seymore4Head wrote: I meant to type: if y in range(1,10) doesn't work. Sigh Sorry How many more times, state what you expect to

Re: I am out of trial and error again Lists

2014-10-24 Thread Dave Angel
Seymore4Head Seymore4Head@Hotmail.invalid Wrote in message: On Fri, 24 Oct 2014 09:54:23 -0700 (PDT), Rustom Mody rustompm...@gmail.com wrote: Totally befuddled myself! Are you deliberately misspelling list to lst and hoping the error will go away. And Puh LEESE dont post screen shots of

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 21:48:14 + (UTC), Denis McMahon denismfmcma...@gmail.com wrote: On Fri, 24 Oct 2014 10:38:31 -0400, Seymore4Head wrote: Thanks everyone for your suggestions. Try loading the following in codeskulptor: http://www.codeskulptor.org/#user38_j6kGKgeOMr_0.py That is a

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head Seymore4Head@Hotmail.invalid wrote: Thanks for all the helpful replies. I just discovered that there is something wrong with my news feed. Some of the messages did not make it to me. I can go back and read this thread in Google Groups but I

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 18:09:59 -0400 (EDT), Dave Angel da...@davea.name wrote: Seymore4Head Seymore4Head@Hotmail.invalid Wrote in message: On Fri, 24 Oct 2014 09:54:23 -0700 (PDT), Rustom Mody rustompm...@gmail.com wrote: Totally befuddled myself! Are you deliberately misspelling list to lst

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head Seymore4Head@Hotmail.invalid wrote: name=123-xyz-abc a=range(10) b=list(range(10)) c=str(list(range(10))) print (a,(a)) print (b,(b)) print (c,(c)) for x in name: if x in a: print (a,(x)) if x in b: print (b,(x))

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
On Saturday, October 25, 2014 4:00:01 AM UTC+5:30, Seymore4Head wrote: On Fri, 24 Oct 2014 18:09:59 -0400 (EDT), Dave Angel wrote: Don't ever retype unless you're trying to frustrate us, I promise I am not trying to frustrate anyone. I know I have. Sorry No issues Seymore :-) As far as

Re: I am out of trial and error again Lists

2014-10-24 Thread Denis McMahon
On Fri, 24 Oct 2014 17:35:34 -0400, Seymore4Head wrote: But finally, with your telephone number decoder, look at: http://www.codeskulptor.org/#user38_QnR06Upp4AH6h0Q.py That is much cleaner than mine. Nice. I did make one more change to mine that makes it easier to read. I changed

Re: I am out of trial and error again Lists

2014-10-24 Thread Denis McMahon
On Fri, 24 Oct 2014 16:58:00 -0400, Seymore4Head wrote: I make lots of typing mistakes. It is not that. Did you see the short example I posted? name=123-xyz-abc for x in name: if x in range(10): print (Range,(x)) if x in str(range(10)): print (String range,(x))

Re: I am out of trial and error again Lists

2014-10-24 Thread Mark Lawrence
On 24/10/2014 23:58, Seymore4Head wrote: On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head Seymore4Head@Hotmail.invalid wrote: name=123-xyz-abc a=range(10) b=list(range(10)) c=str(list(range(10))) print (a,(a)) print (b,(b)) print (c,(c)) for x in name: if x in a: print (a,(x))

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
On Saturday, October 25, 2014 4:30:47 AM UTC+5:30, Seymore4Head wrote: On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head wrote: name=123-xyz-abc a=range(10) b=list(range(10)) c=str(list(range(10))) print (a,(a)) print (b,(b)) print (c,(c)) for x in name: if x in a: print

Re: I am out of trial and error again Lists

2014-10-24 Thread Denis McMahon
On Fri, 24 Oct 2014 18:58:04 -0400, Seymore4Head wrote: On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head Seymore4Head@Hotmail.invalid wrote: OK, assuming you tried to run this in python3, not python2 or codeskulptor. name=123-xyz-abc a=range(10) a is an iterable object giving the

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 16:27:58 -0700 (PDT), Rustom Mody rustompm...@gmail.com wrote: On Saturday, October 25, 2014 4:30:47 AM UTC+5:30, Seymore4Head wrote: On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head wrote: name=123-xyz-abc a=range(10) b=list(range(10)) c=str(list(range(10))) print

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 23:21:43 + (UTC), Denis McMahon denismfmcma...@gmail.com wrote: On Fri, 24 Oct 2014 16:58:00 -0400, Seymore4Head wrote: I make lots of typing mistakes. It is not that. Did you see the short example I posted? name=123-xyz-abc for x in name: if x in range(10):

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 19:48:16 -0400, Seymore4Head Seymore4Head@Hotmail.invalid wrote: On Fri, 24 Oct 2014 16:27:58 -0700 (PDT), Rustom Mody rustompm...@gmail.com wrote: On Saturday, October 25, 2014 4:30:47 AM UTC+5:30, Seymore4Head wrote: On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head wrote:

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head Seymore4Head@Hotmail.invalid wrote: name=012 b=list(range(3)) print (name[1]) print (b[1]) if name[1] == b[1]: print (Eureka!) else: print (OK, I get it) -- https://mail.python.org/mailman/listinfo/python-list

Re: I am out of trial and error again Lists

2014-10-24 Thread MRAB
On 2014-10-25 00:57, Seymore4Head wrote: [snip] Wait! I don't get it. name=012 b=list(range(3)) print (name[1]) print (b[1]) 1 1 I forgot the b If you print the int 1, you'll see: 1 If you print the string 1, you'll see: 1 Normally you want it to print only the characters of the string.

Re: I am out of trial and error again Lists

2014-10-24 Thread Terry Reedy
On 10/24/2014 6:27 PM, Seymore4Head wrote: I promise I am not trying to frustrate anyone. I know I have. Seymore, if you want to learn real Python, download and install 3.4.2 and either use the Idle Shell and Editor or the interactive console interpreter and a decent programmer editor. I

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Sat, 25 Oct 2014 01:20:53 +0100, MRAB pyt...@mrabarnett.plus.com wrote: On 2014-10-25 00:57, Seymore4Head wrote: [snip] Wait! I don't get it. name=012 b=list(range(3)) print (name[1]) print (b[1]) 1 1 I forgot the b If you print the int 1, you'll see: 1 If you print the string 1,

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 20:27:03 -0400, Terry Reedy tjre...@udel.edu wrote: On 10/24/2014 6:27 PM, Seymore4Head wrote: I promise I am not trying to frustrate anyone. I know I have. Seymore, if you want to learn real Python, download and install 3.4.2 and either use the Idle Shell and Editor or

Re: I am out of trial and error again Lists

2014-10-24 Thread Cameron Simpson
On 24Oct2014 20:37, Seymore4Head Seymore4Head@Hotmail.invalid wrote: On Sat, 25 Oct 2014 01:20:53 +0100, MRAB pyt...@mrabarnett.plus.com One function you can use is repr: x = 1 y = 1 print(repr(x)) print(repr(y)) This will print: 1 '1' OK, now it's clear that x is an int and y is a string.

Best Jobb Oriented Web Designig Course Institute in Hyderabad

2014-10-24 Thread dreams media Solution
In Web Designing course, students will learn how to develop a rich look web site. We will explain design principles in Photoshop. In Photoshop we will train you, how to develop logos, icons, banners. We will explain animation principles in flash. In Flash we will train you how to develop

python student at university of jordan.

2014-10-24 Thread heba abukaff
Hi, my name is heba ibrahim abukaff from jordan ,iam a computer information system student at university of jordan . i have a trouble using the tokenizer to find the frequency list for URL using arabic text.and iam using python 2.7.2 on winXP,I tried this code but every time i run the code

Re: python student at university of jordan.

2014-10-24 Thread Chris Angelico
On Sat, Oct 25, 2014 at 12:47 PM, heba abukaff habukaf...@yahoo.com.dmarc.invalid wrote: i have a trouble using the tokenizer to find the frequency list for URL using arabic text.and iam using python 2.7.2 on winXP,I tried this code but every time i run the code appears error with first line

Re: I am out of trial and error again Lists

2014-10-24 Thread Larry Hudson
On 10/24/2014 07:38 AM, Seymore4Head wrote: snip I do get the difference. I don't actually use Python 2. I use CodeSkulptor. I do have Python 3 installed. Actually I have Python 2 installed but IDLE defaults to Python 3. So it is a pain to actually load Python 2. Exactly HOW are you

Re: I am out of trial and error again Lists

2014-10-24 Thread Seymore4Head
On Fri, 24 Oct 2014 19:16:21 -0700, Larry Hudson org...@yahoo.com wrote: On 10/24/2014 07:38 AM, Seymore4Head wrote: snip I do get the difference. I don't actually use Python 2. I use CodeSkulptor. I do have Python 3 installed. Actually I have Python 2 installed but IDLE defaults to Python

Re: python student at university of jordan.

2014-10-24 Thread Cameron Simpson
On 25Oct2014 13:06, Chris Angelico ros...@gmail.com wrote: On Sat, Oct 25, 2014 at 12:47 PM, heba abukaff habukaf...@yahoo.com.dmarc.invalid wrote: i have a trouble using the tokenizer to find the frequency list for URL using arabic text.and iam using python 2.7.2 on winXP,I tried this code

Re: python student at university of jordan.

2014-10-24 Thread Chris Angelico
On Sat, Oct 25, 2014 at 2:05 PM, Cameron Simpson c...@zip.com.au wrote: I'm seeing two problems here. One of them may not actually be a problem in your code, but just in how you're posting: your text has all been rewrapped. Post the exact code, as plain text (not HTML); you should be able to

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
On Saturday, October 25, 2014 5:21:01 AM UTC+5:30, Seymore4Head wrote: On Fri, 24 Oct 2014 16:27:58 -0700 (PDT), Rustom Mody wrote: On Saturday, October 25, 2014 4:30:47 AM UTC+5:30, Seymore4Head wrote: On Wed, 22 Oct 2014 16:30:37 -0400, Seymore4Head wrote: name=123-xyz-abc

Re: I am out of trial and error again Lists

2014-10-24 Thread Rustom Mody
On Saturday, October 25, 2014 9:17:12 AM UTC+5:30, Rustom Mody wrote: 4. The least useful statement to try at the interpreter is print. Yeah this is python2 thinking; in python 3, print is technically an expression. -- https://mail.python.org/mailman/listinfo/python-list

Re: I am out of trial and error again Lists

2014-10-24 Thread Ben Finney
Rustom Mody rustompm...@gmail.com writes: On Saturday, October 25, 2014 9:17:12 AM UTC+5:30, Rustom Mody wrote: 4. The least useful statement to try at the interpreter is print. Yeah this is python2 thinking; in python 3, print is technically an expression. This is wrong thinking. In

Re: python student at university of jordan.

2014-10-24 Thread Steven D'Aprano
heba abukaff wrote: Hi, my name is heba ibrahim abukaff from jordan ,iam a computer information system student at university of jordan . i have a trouble using the tokenizer to find the frequency list for URL using arabic text.and iam using python 2.7.2 on winXP,I tried this code but every

Re: (test) ? a:b

2014-10-24 Thread Steven D'Aprano
alister wrote: On Fri, 24 Oct 2014 10:20:30 -0700, Dan Stromberg wrote: On Fri, Oct 24, 2014 at 1:38 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I don't get why that's considered hard to read. So why is it hard to read when the index is a flag? value = [f,

  1   2   >