Re: Sudoku solver

2015-03-26 Thread Christian Gollwitzer
Am 26.03.15 um 00:04 schrieb Mark Lawrence: On 25/03/2015 22:50, Steven D'Aprano wrote: On Wed, 25 Mar 2015 10:39 pm, Marko Rauhamaa wrote: I have yet to find practical use for fibonacci numbers. Many people have failed to find practical uses for many things from mathematics. Doesn't mean th

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Marko Rauhamaa
Steven D'Aprano : > You're arguing whether or not in the following line of code: > > spam = "abcd" "efgh" > # implicitly concatenated to "abcdefgh" at compile time > > the right hand side pair of strings counts as a single token or two? Am I > right, or am I missing something? > > If that's all it

Re: Supply condition in function call

2015-03-26 Thread Steven D'Aprano
On Fri, 27 Mar 2015 01:21 pm, Rustom Mody wrote: > Anyway my point is that in python (after 2.2??) saying something is an > object is a bit of a tautology -- ie verbiage without information. Er, it's *always* been a tautology. Every value in Python is an object, including classes, and that has b

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 10:24:33 PM UTC-4, Mario Figueiredo wrote: > On Thu, 26 Mar 2015 18:56:25 -0700 (PDT), > > > > >How disappointing, I was expecting something worth opposing. > > > > And that's bad? Successfully opposing a troll is like getting a medal > for winning an argument with

Re: Supply condition in function call

2015-03-26 Thread Rustom Mody
On Friday, March 27, 2015 at 7:56:16 AM UTC+5:30, Ian wrote: > On Thu, Mar 26, 2015 at 7:56 PM, Chris Angelico wrote: > >> On a more specific note, its the 1st line: > >> > >> class filter(object) > >> > >> which knocks me off. > >> If a more restricted type from the ABC was shown which exactly ca

Re: Supply condition in function call

2015-03-26 Thread Rustom Mody
On Friday, March 27, 2015 at 7:26:54 AM UTC+5:30, Chris Angelico wrote: > On Fri, Mar 27, 2015 at 12:41 PM, Rustom Mody wrote: > > On a more specific note, its the 1st line: > > > > class filter(object) > > > > which knocks me off. > > If a more restricted type from the ABC was shown which exactly

Re: Supply condition in function call

2015-03-26 Thread Ian Kelly
On Thu, Mar 26, 2015 at 7:56 PM, Chris Angelico wrote: >> On a more specific note, its the 1st line: >> >> class filter(object) >> >> which knocks me off. >> If a more restricted type from the ABC was shown which exactly captures all >> the iterator-specific stuff like __iter__, __next__ it would

Re: test1

2015-03-26 Thread Mario Figueiredo
On Thu, 26 Mar 2015 18:56:25 -0700 (PDT), Tiglath Suriol wrote: > >How disappointing, I was expecting something worth opposing. > And that's bad? Successfully opposing a troll is like getting a medal for winning an argument with Spencer Pratt. Delusional pricks like you are only worth the 2 or

Test3

2015-03-26 Thread Tiglath Suriol
/* * Only assholes need reply to this thread. */ var Obj = (function() { return function() { var docRoot = '/as-qa23'; this.validateDocRoot = function(val) { // throw Exception if not OK }; this.setDocRoot = function(val) { this.val

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 9:55:08 PM UTC-4, Denis McMahon wrote: > On Thu, 26 Mar 2015 14:06:28 -0700, marcuslom101 wrote: > > > I posted two test messages containing code. They are still there, are > > you blind as well as dumb? > > The message that you posted at the start of this thread m

Re: Fwd: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 6:41:15 PM UTC-4, Steven D'Aprano wrote: > On Fri, 27 Mar 2015 07:00 am, BartC wrote: > [...] > > Don't give the troll the attention he craves. He reacted with hostility and > scorn when we gave him some friendly good advice, don't imagine for a > second you're going

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 6:36:57 PM UTC-4, Steven D'Aprano wrote: > On Fri, 27 Mar 2015 02:33 am, Joel Goldstick wrote: > [...] > > Don't give the troll the attention he craves. He has as much told us that he > is beyond reason -- he's been trolling for years, you don't need to justify > you

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 5:24:10 PM UTC-4, sohca...@gmail.com wrote: > On Tuesday, March 24, 2015 at 7:48:05 PM UTC-7, Tiglath Suriol wrote: > > > >

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 5:20:08 PM UTC-4, Mario Figueiredo wrote: > > Hush now, little baby troll. Don't get all teary on us. Calm down. > Just a little while ago you were saying you didn't care about what > people said. > > So don't care about what people say. > > BTW, you are as stupid

Re: Supply condition in function call

2015-03-26 Thread Chris Angelico
On Fri, Mar 27, 2015 at 12:41 PM, Rustom Mody wrote: > On Thursday, March 26, 2015 at 11:30:57 AM UTC+5:30, Chris Angelico wrote: >> On Thu, Mar 26, 2015 at 3:02 PM, Rustom Mody wrote: >> > [And BTW >> > help(filter) in python2 is much better documention than in python3 >> > ] >> >> Python 2.7.3

Re: test1

2015-03-26 Thread Denis McMahon
On Thu, 26 Mar 2015 14:06:28 -0700, marcuslom101 wrote: > I posted two test messages containing code. They are still there, are > you blind as well as dumb? The message that you posted at the start of this thread may have contained code, but it wasn't python code, so it's off topic here. Hence

Re: Fwd: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 5:12:00 PM UTC-4, Mario Figueiredo wrote: > On Thu, 26 Mar 2015 13:58:36 -0700 (PDT), > wrote: > > >I just needed to save some code and there was no email at hand > > > > LOL. What an imbecile. > > You gotta love trolls sometimes. They exist with the sole purpos

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Ian Kelly
On Thu, Mar 26, 2015 at 5:15 PM, Steven D'Aprano wrote: > Looks to me that the two string literals each get their own token, and are > concatenated at a later stage of compilation, not during parsing. Thanks. The dispute was about expressions, though. I think we're all in agreement that there are

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 4:56:41 PM UTC-4, Tim Chase wrote: > On 2015-03-26 08:33, Tiglath Suriol wrote: > > > Mark Lawrence > > > > I don't remember addressing his guy, HE addressed me FIRST, as all > > of you did, > > Hmmm...To what then has he been replying? *You* posted/broadcast th

Re: Fwd: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 5:04:21 PM UTC-4, Joel Goldstick wrote: > post to yourself > funny how you have a new email address > The strange fascination you have with the email address of someone you don't know that d makes you write more and more, informs readers of how exciting your life

Re: Supply condition in function call

2015-03-26 Thread Rustom Mody
On Thursday, March 26, 2015 at 11:30:57 AM UTC+5:30, Chris Angelico wrote: > On Thu, Mar 26, 2015 at 3:02 PM, Rustom Mody wrote: > > [And BTW > > help(filter) in python2 is much better documention than in python3 > > ] > > Python 2.7.3 (default, Mar 13 2014, 11:03:55) > [GCC 4.7.2] on linux2 > >

Save session Selenium PhantomJS

2015-03-26 Thread Juan C.
Objective: Save the browser session/cookies to share them in multiples script execution. I currently have this working using ChromeDriver: chrome_options = Options() chrome_options.add_argument("user-data-dir=" + os.path.dirname(sys.argv[0])) browser = webdriver.Chrome(chrome_options=chrome_optio

Re: Cannot Uninstall 3.4

2015-03-26 Thread Mario Figueiredo
On Thu, 26 Mar 2015 18:52:41 -0500, T Younger wrote: >I have 3.4.1 (8/14) and replaced it with 3.4.2 (12/14) >Neither of these uninstalled or I do not believe even had the option. > >I now wanted to update to 3.4.3 and the uninstall fails, provided the >message that the installer is missing a pro

Re: Cannot Uninstall 3.4

2015-03-26 Thread Ben Finney
T Younger writes: > I have 3.4.1 (8/14) and replaced it with 3.4.2 (12/14) > Neither of these uninstalled or I do not believe even had the option. That's not so much a question about Python; it is rather a question of how you install and uninstall applications on your operating system. There's n

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Tim Chase
On 2015-03-27 10:15, Steven D'Aprano wrote: > If that's all it is, why don't you just run the tokenizer over it > and see what it says? > > py> from cStringIO import StringIO > py> code = StringIO('spam = "abcd" "efgh"\n') > py> import tokenize > py> for item in tokenize.generate_tokens(code.readl

Cannot Uninstall 3.4

2015-03-26 Thread T Younger
I have 3.4.1 (8/14) and replaced it with 3.4.2 (12/14) Neither of these uninstalled or I do not believe even had the option. I now wanted to update to 3.4.3 and the uninstall fails, provided the message that the installer is missing a program then backs off the changes. I loaded 3.5.0a2 and then

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Ian Kelly
On Thu, Mar 26, 2015 at 12:54 PM, Thomas 'PointedEars' Lahn wrote: > Ian Kelly wrote: >> What I mean is that if you construct a parse tree of "foo" "bar" using >> that grammar, it looks like this: >> >> expr >>| >> STRING+ >> / \ >> STRING STRING >> […] >> >> There is only

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Steven D'Aprano
On Fri, 27 Mar 2015 05:56 am, Thomas 'PointedEars' Lahn wrote: [snip argument] Hey guys, I'm trying to follow the argument but I must admit you've completely lost me with the angels-on-the-head-of-a-pin nitpicking about EBNF. I love a good pedant-brawl as much as you, so let me see if I've got th

Re: Basic Python V3 Search Tool using RE module

2015-03-26 Thread Steven D'Aprano
On Fri, 27 Mar 2015 04:11 am, Gregg Dotoli wrote: >> Thanks for your help and patience. I'm new with Python. No problems! If you hang around here, pay attention to the constructive criticism you are given, and ignore the troll over on the "test1" thread, you'll learn a lot. Let's look at your co

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Gregory Ewing
Ian Kelly wrote: What I mean is that if you construct a parse tree of "foo" "bar" using that grammar, it looks like this: expr | STRING+ / \ STRING STRING Not quite -- STRING+ is not a symbol in the grammar, it's a shorthand for a combination of symbols. The parse tree

Re: Fwd: test1

2015-03-26 Thread Steven D'Aprano
On Fri, 27 Mar 2015 07:00 am, BartC wrote: [...] Don't give the troll the attention he craves. He reacted with hostility and scorn when we gave him some friendly good advice, don't imagine for a second you're going to reason with him. He's admitted that he's been trolling for years, so don't bothe

Re: test1

2015-03-26 Thread Steven D'Aprano
On Fri, 27 Mar 2015 02:33 am, Joel Goldstick wrote: [...] Don't give the troll the attention he craves. He has as much told us that he is beyond reason -- he's been trolling for years, you don't need to justify your actions. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: test1

2015-03-26 Thread Steven D'Aprano
On Fri, 27 Mar 2015 03:26 am, Tim Chase wrote: [...] Don't give the troll the attention he craves. He has as much told us that he is beyond reason -- he's been trolling for years, you don't need to justify your actions. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Sudoku solver

2015-03-26 Thread Pete Forman
Here's my Python sudoku solver which I wrote about 10 years ago. http://petef.22web.org/sudoku/ It works by applying the solving techniques I came up with. No trial and error or backtracking is used, so it is not up to cracking the very hardest puzzles. Run time is 15 ms to 45 ms on a 2009 MacBoo

Re: Best way to calculate fraction part of x?

2015-03-26 Thread Russell Owen
On 3/24/15 6:39 PM, Jason Swails wrote: On Mon, Mar 23, 2015 at 8:38 PM, Emile van Sebille mailto:em...@fenx.com>> wrote: On 3/23/2015 5:52 AM, Steven D'Aprano wrote: Are there any other, possibly better, ways to calculate the fractional part of a number? flo

Re: Best way to calculate fraction part of x?

2015-03-26 Thread Oscar Benjamin
On 23 March 2015 at 12:52, Steven D'Aprano wrote: > I have a numeric value, possibly a float, Decimal or (improper) Fraction, > and I want the fractional part. E.g. fract(2.5) should give 0.5. > > Here are two ways to do it: > > py> x = 2.5 > py> x % 1 > 0.5 > py> x - int(x) > 0.5 > > x % 1 is sig

Re: sys.exec_prefix doesn't seem to reflect --exec-prefix path

2015-03-26 Thread Ned Deily
In article <548dcac1-fa00-4fc1-81d1-ccae28caf...@googlegroups.com>, Ralph Heinkel wrote: > on my linux box there is a python version 2.7.5 installed in /usr/local. > > Now I want to install the newer version 2.7.9, but in a different directory > to avoid clashes with the current installation. >

Re: Supply condition in function call

2015-03-26 Thread Cameron Simpson
On 26Mar2015 11:37, Peter Otten <__pete...@web.de> wrote: You are right. [...] By the way, in this case you don't need the list at all: def vartuple(vars): return namedtuple("locals", vars)._make(vars.values()) Hmm. Neat. I had not realised that was available. You'd need "vars.keys()", no

Re: test1

2015-03-26 Thread sohcahtoa82
On Tuesday, March 24, 2015 at 7:48:05 PM UTC-7, Tiglath Suriol wrote: > >

Re: test1

2015-03-26 Thread Mario Figueiredo
On Thu, 26 Mar 2015 14:06:28 -0700 (PDT), marcuslom...@gmail.com wrote: > >I posted two test messages containing code. They are still there, > are you blind as well as dumb? > >Your post is also off-topic, so what are you whining about, girl? > >You can ignore my posts almost effortlessly, the

Re: Fwd: test1

2015-03-26 Thread Mario Figueiredo
On Thu, 26 Mar 2015 13:58:36 -0700 (PDT), marcuslom...@gmail.com wrote: >I just needed to save some code and there was no email at hand > LOL. What an imbecile. You gotta love trolls sometimes. They exist with the sole purpose to make you feel good about yourself. -- https://mail.python.org/m

Re: test1

2015-03-26 Thread marcuslom101
On Thursday, March 26, 2015 at 4:03:57 PM UTC-4, Denis McMahon wrote: > On Thu, 26 Mar 2015 10:00:56 -0700, Tiglath Suriol wrote: > > > I posted two test messages containing code. > > No, you excreted a pile of steaming excrement and have continued to do > so. Your original post in this thread h

Re: Fwd: test1

2015-03-26 Thread Joel Goldstick
post to yourself funny how you have a new email address On Thu, Mar 26, 2015 at 4:58 PM, wrote: > On Thursday, March 26, 2015 at 4:01:08 PM UTC-4, BartC wrote: >> On 26/03/2015 15:38, Tiglath Suriol wrote: >> >> > I did not spam anyone. I posted to an open public newsgroup. Just some >> > cod

Re: Fwd: test1

2015-03-26 Thread marcuslom101
On Thursday, March 26, 2015 at 4:01:08 PM UTC-4, BartC wrote: > On 26/03/2015 15:38, Tiglath Suriol wrote: > > > I did not spam anyone. I posted to an open public newsgroup. Just some > > code, nothing offensive or even directed to anyone. Then people started to > > get cute, and now that ret

Re: test1

2015-03-26 Thread Tim Chase
On 2015-03-26 08:33, Tiglath Suriol wrote: > > Mark Lawrence > > I don't remember addressing his guy, HE addressed me FIRST, as all > of you did, Hmmm...To what then has he been replying? *You* posted/broadcast the FIRST message which addressed every member of the list. If you don't want to

Re: Best way to calculate fraction part of x?

2015-03-26 Thread Emile van Sebille
On 3/24/2015 6:39 PM, Jason Swails wrote: On Mon, Mar 23, 2015 at 8:38 PM, Emile van Sebille float (("%6.3f" % x)[-4:]) ​In general you lose a lot of precision this way...​ Even more if you use %6.1 -- but feel free to flavor to taste. :) Emile -- https://mail.python.org/mai

Re: test1

2015-03-26 Thread Emile van Sebille
On 3/25/2015 12:49 PM, Tiglath Suriol wrote: On Tuesday, March 24, 2015 at 11:04:48 PM UTC-4, Chris Angelico wrote: On Wed, Mar 25, 2015 at 1:47 PM, Tiglath Suriol wrote: PLONK< -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: test1

2015-03-26 Thread BartC
On 26/03/2015 15:38, Tiglath Suriol wrote: I did not spam anyone. I posted to an open public newsgroup. Just some code, nothing offensive or even directed to anyone. Then people started to get cute, and now that returned fire is a bucket a drop they complaints like bitches on the rag. Not

Re: test1

2015-03-26 Thread Denis McMahon
On Thu, 26 Mar 2015 10:00:56 -0700, Tiglath Suriol wrote: > I posted two test messages containing code. No, you excreted a pile of steaming excrement and have continued to do so. Your original post in this thread had no relevance to the newsgroup or the gated mailing list, it was purely interne

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Thomas 'PointedEars' Lahn
Ian Kelly wrote: > […] Thomas 'PointedEars' Lahn […] wrote: >> Ian Kelly wrote: >>> What the grammar that you quoted from shows is that STRING+ is an >>> expression. The individual STRINGs of a STRING+ are not expressions, >>> except to the extent that they can be parsed in isolation as a >>> STRI

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Thomas 'PointedEars' Lahn
Ian Kelly wrote: > On Thu, Mar 26, 2015 at 12:29 PM, Ian Kelly wrote: >> On Thu, Mar 26, 2015 at 10:45 AM, Thomas 'PointedEars' Lahn >>> No, in the used flavour of EBNF the unquoted “+” following a goal symbol >>> clearly means the occurrence of *at least one* of the immediately >>> preceding sym

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Ian Kelly
On Thu, Mar 26, 2015 at 12:29 PM, Ian Kelly wrote: > On Thu, Mar 26, 2015 at 10:45 AM, Thomas 'PointedEars' Lahn >> No, in the used flavour of EBNF the unquoted “+” following a goal symbol >> clearly means the occurrence of *at least one* of the immediately preceding >> symbol, meaning either one

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Ian Kelly
On Thu, Mar 26, 2015 at 10:45 AM, Thomas 'PointedEars' Lahn wrote: > Ian Kelly wrote: >> What the grammar that you quoted from shows is that STRING+ is an >> expression. The individual STRINGs of a STRING+ are not expressions, >> except to the extent that they can be parsed in isolation as a >> ST

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Thomas 'PointedEars' Lahn
Thomas 'PointedEars' Lahn wrote: > multiple-string = STRING *STRING > […] > in ABNF. JFTR: ABNF allows for multiple-string = 1*STRING to be equivalent to the above. pp. -- PointedEars Twitter: @PointedEars2 Please do not

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Thomas 'PointedEars' Lahn
Dave Angel wrote: [Fixed quotation] > On 03/26/2015 01:09 AM, Ian Kelly wrote: > Thomas 'PointedEars' Lahn wrote: >> > >> literal-concatenation> >> >> What the grammar that you quoted from shows is that STRING+ is

Re: Basic Python V3 Search Tool using RE module

2015-03-26 Thread Dave Angel
On 03/26/2015 01:11 PM, Gregg Dotoli wrote: On Wednesday, March 25, 2015 at 3:43:38 PM UTC-4, Gregg Dotoli wrote: This basic script will help to find evidence of CryptoWall on a slave drive. Although it is just a string, more complex regex patterns can be replaced with the string. It is incredib

Re: Basic Python V3 Search Tool using RE module

2015-03-26 Thread Gregg Dotoli
On Wednesday, March 25, 2015 at 3:43:38 PM UTC-4, Gregg Dotoli wrote: > This basic script will help to find > evidence of CryptoWall on a slave drive. Although it is > just a string, more complex regex patterns can be > replaced with the string. It is incredible how fast Python is and > how easy

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 11:34:11 AM UTC-4, Joel Goldstick wrote: > On Thu, Mar 26, 2015 at 11:25 AM, Tiglath Suriol > wrote: > > On Thursday, March 26, 2015 at 9:53:48 AM UTC-4, Joel Goldstick wrote: > >> Your first message was not python related. Your subsequent messages > >> were rude.

Re: Sudoku solver

2015-03-26 Thread Marko Rauhamaa
Ian Kelly : > On Thu, Mar 26, 2015 at 9:48 AM, Marko Rauhamaa wrote: >> In fact, the "trial-and-error" technique is used in automated theorem >> proving: >> >> Lean provers are generally implemented in Prolog, and make proficient >> use of the backtracking engine and logic variables of that l

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-26 Thread Thomas 'PointedEars' Lahn
Ian Kelly wrote: > […] Thomas 'PointedEars' Lahn […] wrote: >> Chris Angelico wrote: >>> […] Thomas 'PointedEars' Lahn […] wrote: > Implicit concatenation is part of the syntax, not part of the > expression evaluator. Reads like nonsense to me. >>> What do you mean? >> As I showed, st

Re: Sudoku solver

2015-03-26 Thread Ian Kelly
On Thu, Mar 26, 2015 at 9:48 AM, Marko Rauhamaa wrote: > Ian Kelly : > >> On Thu, Mar 26, 2015 at 8:23 AM, Marko Rauhamaa wrote: >>> That's trial and error, aka, reductio ad absurdum. >> >> Okay, I've probably used single-lookahead trial and error in my >> reasoning at some point. But the example

Re: What is elegant way to do configuration on server app

2015-03-26 Thread Grant Edwards
On 2015-03-26, Ben Finney wrote: > Jerry OELoo writes: > >> Currently, I can just think out that I put status into a configure >> file, and service schedule read this file and get status value, > > That sounds like a fine start. Some advice: > > * You may be tempted to make the configuration file

Re: Sudoku solver

2015-03-26 Thread Marko Rauhamaa
Ian Kelly : > On Thu, Mar 26, 2015 at 8:23 AM, Marko Rauhamaa wrote: >> That's trial and error, aka, reductio ad absurdum. > > Okay, I've probably used single-lookahead trial and error in my > reasoning at some point. But the example you give is equivalent to the > deductive process "That can't b

Re: Sudoku solver

2015-03-26 Thread Marko Rauhamaa
Dave Angel : > When in a playful mood, I wonder if all the Sudoku puzzles out there > are just permutations of a few hundred written by Will Shortz. A sudoku solver can be trivially turned into a puzzle generator: $ ./sudok

Re: Supply condition in function call

2015-03-26 Thread Grant Edwards
On 2015-03-25, Ian Kelly wrote: > On Wed, Mar 25, 2015 at 1:53 PM, Grant Edwards > wrote: >> On 2015-03-25, Ian Kelly wrote: >>> On Wed, Mar 25, 2015 at 11:29 AM, Manuel Graune >>> wrote: >>> I'm looking for a way to supply a condition to an if-statement inside a function body when

Re: Fwd: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 9:52:36 AM UTC-4, Ian wrote: > On Mar 26, 2015 7:35 AM, "Igor Korot" wrote: > > > > > >  On Thu, Mar 26, 2015 at 9:01 AM, alister > > > wrote: > > > > i hope he has a good spam filter as I am about to sign him up for > > > > everything :-) > > > > > > Well he

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 11:14:06 AM UTC-4, Mark Lawrence wrote: > On 26/03/2015 01:26, Tiglath Suriol wrote: > > On Wednesday, March 25, 2015 at 7:58:11 PM UTC-4, Mark Lawrence wrote: > >> > >> You might be used to dealing with other people in other newsgroups. > >> This is the Python main m

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 11:14:06 AM UTC-4, Mark Lawrence wrote: > On 26/03/2015 01:26, Tiglath Suriol wrote: > > On Wednesday, March 25, 2015 at 7:58:11 PM UTC-4, Mark Lawrence wrote: > >> > >> You might be used to dealing with other people in other newsgroups. > >> This is the Python main m

Re: test1

2015-03-26 Thread Joel Goldstick
On Thu, Mar 26, 2015 at 11:25 AM, Tiglath Suriol wrote: > On Thursday, March 26, 2015 at 9:53:48 AM UTC-4, Joel Goldstick wrote: >> Your first message was not python related. Your subsequent messages >> were rude. You've never been here before it seems. This is an >> interesting group, open to

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 9:53:48 AM UTC-4, Joel Goldstick wrote: > Your first message was not python related. Your subsequent messages > were rude. You've never been here before it seems. This is an > interesting group, open to all with interest in python. How do you > fit in? Not > > O

Re: Sudoku solver

2015-03-26 Thread Chris Angelico
On Fri, Mar 27, 2015 at 2:03 AM, Dave Angel wrote: > On 03/26/2015 10:41 AM, Chris Angelico wrote: > that's already been proven. So, that's why I would avoid guessing. >> >> >> I've written a lot of solvers for various puzzles. Minesweeper, >> Sudoku, a binary Sudoku-like puzzle that I don't real

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 9:33:43 AM UTC-4, Igor Korot wrote: > On Thu, Mar 26, 2015 at 9:01 AM, alister > wrote: > > On Thu, 26 Mar 2015 00:36:49 +, Mark Lawrence wrote: > > > >> On 26/03/2015 00:17, MRAB wrote: > >>> On 2015-03-25 22:36, Chris Angelico wrote: > On Thu, Mar 26, 2015

Re: test1

2015-03-26 Thread Tiglath Suriol
On Thursday, March 26, 2015 at 9:01:23 AM UTC-4, alister wrote: > On Thu, 26 Mar 2015 00:36:49 +, Mark Lawrence wrote: > > > On 26/03/2015 00:17, MRAB wrote: > >> On 2015-03-25 22:36, Chris Angelico wrote: > >>> On Thu, Mar 26, 2015 at 6:49 AM, Tiglath Suriol > >>> wrote: > Two possibili

Re: test1

2015-03-26 Thread Mark Lawrence
On 26/03/2015 01:26, Tiglath Suriol wrote: On Wednesday, March 25, 2015 at 7:58:11 PM UTC-4, Mark Lawrence wrote: You might be used to dealing with other people in other newsgroups. This is the Python main mailing list/newsgroup. There is a rather more civilised way of doing things around here

Re: Sudoku solver

2015-03-26 Thread Ian Kelly
On Thu, Mar 26, 2015 at 8:23 AM, Marko Rauhamaa wrote: > Ian Kelly : > >> I don't think that I have used trial and error, in my head or >> otherwise, in any sudoku I have ever solved. > > Of course you have. "This here can't be a 2 because if it were a 2, that > there would have to be a 5, which i

Re: Sudoku solver

2015-03-26 Thread Dave Angel
On 03/26/2015 10:41 AM, Chris Angelico wrote: that's already been proven. So, that's why I would avoid guessing. I've written a lot of solvers for various puzzles. Minesweeper, Sudoku, a binary Sudoku-like puzzle that I don't really have a good name for, several others. Every time, I've tried t

Re: Sudoku solver

2015-03-26 Thread Chris Angelico
On Fri, Mar 27, 2015 at 1:14 AM, Dave Angel wrote: > On 03/26/2015 08:37 AM, Chris Angelico wrote: >> Nothing. And solving a Sudoku puzzle - or any other puzzle - should >> require no guessing. It should be possible to solve purely by logic. >> Same goes for every other kind of puzzle out there; i

Re: Sudoku solver

2015-03-26 Thread Marko Rauhamaa
Ian Kelly : > I don't think that I have used trial and error, in my head or > otherwise, in any sudoku I have ever solved. Of course you have. "This here can't be a 2 because if it were a 2, that there would have to be a 5, which is impossible. Thus, the only remaining alternative is 3, so I mark

Re: Sudoku solver

2015-03-26 Thread Marko Rauhamaa
Marko Rauhamaa : > I have optimized my solution slightly: > > 1. precalculated integer division operations (big savings) > > 2. interned integers (little savings) > > The example above now finishes in 41 minutes on my computer. (The C > version finishes in 13 seconds). Any considered harmfull

Re: Sudoku solver

2015-03-26 Thread Dave Angel
On 03/26/2015 08:37 AM, Chris Angelico wrote: On Thu, Mar 26, 2015 at 11:26 PM, Marko Rauhamaa wrote: "Frank Millman" : Here is another python-based sudoku solver - http://www.ics.uci.edu/~eppstein/PADS/Sudoku.py >From its docstring - "A proper Sudoku puzzle must have a unique solution, an

Re: Fwd: test1

2015-03-26 Thread Joel Goldstick
Apparently Tiglath is a troll: see this: http://www.science-bbs.com/121-math/6b7f8c793e31402e.htm On Thu, Mar 26, 2015 at 9:51 AM, Ian Kelly wrote: > On Mar 26, 2015 7:35 AM, "Igor Korot" wrote: >> >> On Thu, Mar 26, 2015 at 9:01 AM, alister >> wrote: >> > i hope he has a good spam filter as

Re: test1

2015-03-26 Thread Joel Goldstick
Your first message was not python related. Your subsequent messages were rude. You've never been here before it seems. This is an interesting group, open to all with interest in python. How do you fit in? Not On Wed, Mar 25, 2015 at 9:34 PM, Tiglath Suriol wrote: > On Wednesday, March 25, 20

Re: Fwd: test1

2015-03-26 Thread Ian Kelly
On Mar 26, 2015 7:35 AM, "Igor Korot" wrote: > > On Thu, Mar 26, 2015 at 9:01 AM, alister > wrote: > > i hope he has a good spam filter as I am about to sign him up for > > everything :-) > > Well he did gave out his private key to the public in an ASCII format. > I wonder what people can do wit

Fwd: test1

2015-03-26 Thread Igor Korot
On Thu, Mar 26, 2015 at 9:01 AM, alister wrote: > On Thu, 26 Mar 2015 00:36:49 +, Mark Lawrence wrote: > >> On 26/03/2015 00:17, MRAB wrote: >>> On 2015-03-25 22:36, Chris Angelico wrote: On Thu, Mar 26, 2015 at 6:49 AM, Tiglath Suriol wrote: > Two possibilities: > >

Re: Sudoku solver

2015-03-26 Thread Ian Kelly
On Mar 26, 2015 6:31 AM, "Marko Rauhamaa" wrote: > > "Frank Millman" : > > > Here is another python-based sudoku solver - > > > > http://www.ics.uci.edu/~eppstein/PADS/Sudoku.py > > > >>From its docstring - > > > > "A proper Sudoku puzzle must have a unique solution, and it should be > > possible

Re: test1

2015-03-26 Thread alister
On Thu, 26 Mar 2015 00:36:49 +, Mark Lawrence wrote: > On 26/03/2015 00:17, MRAB wrote: >> On 2015-03-25 22:36, Chris Angelico wrote: >>> On Thu, Mar 26, 2015 at 6:49 AM, Tiglath Suriol >>> wrote: Two possibilities: You are a moderator. If you are a moderator you are welcome

Re: Basic Python V3 Search Tool using RE module

2015-03-26 Thread CHIN Dihedral
> Gregg Dotoli Are you reminding everyone who had a PC running DOS2.X-3X in 1990. It was really a pain at that time that a hard disk of an intel-MS based PC was sold hundreds of dollars, and another pain was that the buyer had to use the disabled dir in DOS after buying a HD. -- https://ma

sys.exec_prefix doesn't seem to reflect --exec-prefix path

2015-03-26 Thread Ralph Heinkel
Hi, on my linux box there is a python version 2.7.5 installed in /usr/local. Now I want to install the newer version 2.7.9, but in a different directory to avoid clashes with the current installation. What I did was: ./configure --prefix /usr/local/Python-2.7.9 --exec-prefix /usr/local/Python

Re: Sudoku solver

2015-03-26 Thread Chris Angelico
On Thu, Mar 26, 2015 at 11:26 PM, Marko Rauhamaa wrote: > "Frank Millman" : > >> Here is another python-based sudoku solver - >> >> http://www.ics.uci.edu/~eppstein/PADS/Sudoku.py >> >>>From its docstring - >> >> "A proper Sudoku puzzle must have a unique solution, and it should be >> possible to

Re: Sudoku solver

2015-03-26 Thread Marko Rauhamaa
"Frank Millman" : > Here is another python-based sudoku solver - > > http://www.ics.uci.edu/~eppstein/PADS/Sudoku.py > >>From its docstring - > > "A proper Sudoku puzzle must have a unique solution, and it should be > possible to reach that solution by a sequence of logical deductions > without tr

Re: Sudoku solver

2015-03-26 Thread Marko Rauhamaa
Abhiram R : > On Thu, Mar 26, 2015 at 8:54 AM, Ian Kelly wrote: >> On Wed, Mar 25, 2015 at 8:56 PM, Abhiram R wrote: >>> On Mar 26, 2015 5:39 AM, "Ian Kelly" wrote: $ cat sudoku2.dat . . . 7 . . . . . 1 . . . . . . . . . . . 4 3 . 2 . . . . . . . . . . 6 . . . 5 .

Re: Regex Python Help

2015-03-26 Thread Denis McMahon
On Wed, 25 Mar 2015 14:19:39 -0700, Gregg Dotoli wrote: > On Wednesday, March 25, 2015 at 4:36:01 PM UTC-4, Denis McMahon wrote: >> On Tue, 24 Mar 2015 11:13:41 -0700, gdotoli wrote: >> >> > I am creating a tool to search a filesystem for one simple string. >> >> man grep >> >> STOP! REINVENTIN

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-26 Thread Steven D'Aprano
On Thu, 26 Mar 2015 08:47 pm, Ivan Evstegneev wrote: > > >> -Original Message- >> From: Python-list [mailto:python-list- >> bounces+webmailgroups=gmail@python.org] On Behalf Of Steven >> D'Aprano >> Sent: Thursday, March 26, 2015 01:49 >> To: python-list@python.org >> Subject: Re: Fu

Re: Supply condition in function call

2015-03-26 Thread Peter Otten
Cameron Simpson wrote: > On 26Mar2015 10:03, Peter Otten <__pete...@web.de> wrote: >>Cameron Simpson wrote: >>> vars = locals() >>> varnames = list(vars.keys()) >> >>That leaves varnames in undefined order. Consider >> >>varnames = sorted(vars) > > Actually, not necessary. > > I star

Re: module attributes and docstrings

2015-03-26 Thread Chris Angelico
On Thu, Mar 26, 2015 at 8:53 PM, Mario Figueiredo wrote: > However, lambda functions do read well in my mind and I find it hard > to spot where they obscure the code more than a function. So the > explicit vs. implicit part of the argument doesn't translate well with > me. I however agree that a f

Re: Supply condition in function call

2015-03-26 Thread Cameron Simpson
On 26Mar2015 10:03, Peter Otten <__pete...@web.de> wrote: Cameron Simpson wrote: vars = locals() varnames = list(vars.keys()) That leaves varnames in undefined order. Consider varnames = sorted(vars) Actually, not necessary. I started with sorted, but it is irrelevant, so I bac

Re: module attributes and docstrings

2015-03-26 Thread Mario Figueiredo
On Tue, 24 Mar 2015 15:33:41 -0400, Terry Reedy wrote: > >You have discovered one of advantages of a def statement over a >name=lambda assignment statement. In Python, there is no good reason to >use the latter form and PEP 8 specifically discourages it: "Always use a >def statement instead o

Re: module attributes and docstrings

2015-03-26 Thread Mario Figueiredo
Sorry for the late reply. We experienced a 3 day blackout following one of the most amazing thunderstorms I've witnessed in my life. On Tue, 24 Mar 2015 22:49:49 +1100, Steven D'Aprano wrote: >On Tue, 24 Mar 2015 07:55 pm, Mario Figueiredo wrote: > >> Reading PEP 257 and 258 I got the impression

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-26 Thread Ivan Evstegneev
> -Original Message- > From: Python-list [mailto:python-list- > bounces+webmailgroups=gmail@python.org] On Behalf Of Steven > D'Aprano > Sent: Thursday, March 26, 2015 01:49 > To: python-list@python.org > Subject: Re: Function Defaults - avoiding unneccerary combinations of > argument

Re: Supply condition in function call

2015-03-26 Thread Peter Otten
Cameron Simpson wrote: > On 26Mar2015 07:27, Manuel Graune wrote: >>Gary Herron writes: >>> On 03/25/2015 10:29 AM, Manuel Graune wrote: def test1(a, b, condition="True"): for i,j in zip(a,b): c=i+j if eval(condition): print("Foo")

  1   2   >