Re: Python Greek mailing list [was Re: Why 'files.py' does not print the filenames into a table format?]

2013-06-16 Thread Chris “Kwpolska” Warrick
On Sun, Jun 16, 2013 at 1:09 PM, Mark Lawrence wrote: > On 16/06/2013 11:57, Ferrous Cranus wrote: >> >> i did Steven that why i asked in the 1st place >> >> To post a message to all the list members, send email to >> python-gre...@python.org. >> >> this is not a valid nrewgroup name/ >> > > Not v

Re: Python Greek mailing list [was Re: Why 'files.py' does not print the filenames into a table format?]

2013-06-16 Thread Ferrous Cranus
On 16/6/2013 2:09 μμ, Mark Lawrence wrote: On 16/06/2013 11:57, Ferrous Cranus wrote: i did Steven that why i asked in the 1st place To post a message to all the list members, send email to python-gre...@python.org. this is not a valid nrewgroup name/ Not valid in the same way that supp...@

Re: Python Greek mailing list [was Re: Why 'files.py' does not print the filenames into a table format?]

2013-06-16 Thread Mark Lawrence
On 16/06/2013 11:57, Ferrous Cranus wrote: i did Steven that why i asked in the 1st place To post a message to all the list members, send email to python-gre...@python.org. this is not a valid nrewgroup name/ Not valid in the same way that supp...@superhost.gr is not valid? -- "Steve is goi

Re: Python Greek mailing list [was Re: Why 'files.py' does not print the filenames into a table format?]

2013-06-16 Thread Chris “Kwpolska” Warrick
On Sun, Jun 16, 2013 at 12:33 PM, Steven D'Aprano wrote: > > On Sun, 16 Jun 2013 11:28:00 +0300, Nick the Gr33k wrote: > > > On 16/6/2013 8:06 πμ, Steven D'Aprano wrote: > >> Nikos, > >> > >> Have you considered subscribing to this? > >> > >> http://mail.python.org/mailman/listinfo/python-greece >

Re: Python Greek mailing list [was Re: Why 'files.py' does not print the filenames into a table format?]

2013-06-16 Thread Ferrous Cranus
On 16/6/2013 1:33 μμ, Steven D'Aprano wrote: On Sun, 16 Jun 2013 11:28:00 +0300, Nick the Gr33k wrote: On 16/6/2013 8:06 πμ, Steven D'Aprano wrote: Nikos, Have you considered subscribing to this? http://mail.python.org/mailman/listinfo/python-greece [...] I prefer staying here but i can a

Re: Python Greek mailing list [was Re: Why 'files.py' does not print the filenames into a table format?]

2013-06-16 Thread Steven D'Aprano
On Sun, 16 Jun 2013 11:28:00 +0300, Nick the Gr33k wrote: > On 16/6/2013 8:06 πμ, Steven D'Aprano wrote: >> Nikos, >> >> Have you considered subscribing to this? >> >> http://mail.python.org/mailman/listinfo/python-greece [...] > I prefer staying here but i can also subscribe there as well if you

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-16 Thread Denis McMahon
On Sun, 16 Jun 2013 11:35:12 +0300, Nick the Gr33k wrote: > TB behaves for me the same way. Any line > 80 chars gets a newline. Why > this is happening? Why not post up to 256 chars in a single line? Because this is usenet. Read the RFCs if you must know! -- Denis McMahon, denismfmcma...@gmail.

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-16 Thread Nick the Gr33k
On 16/6/2013 10:23 πμ, Denis McMahon wrote: On Sat, 15 Jun 2013 22:38:38 +0300, Nick the Gr33k wrote: PLEASE take a look, its not a huge code First, you need to start writing your code to less than 80 columns if you're going to keep posting it to usenet. I'm sure I'm not the only person who c

Re: Python Greek mailing list [was Re: Why 'files.py' does not print the filenames into a table format?]

2013-06-16 Thread Nick the Gr33k
On 16/6/2013 8:06 πμ, Steven D'Aprano wrote: Nikos, Have you considered subscribing to this? http://mail.python.org/mailman/listinfo/python-greece Possibly some of these concepts will be easier for you to understand if explained to you in your native language. Or you might be able to join a l

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-16 Thread Denis McMahon
On Sat, 15 Jun 2013 22:38:38 +0300, Nick the Gr33k wrote: > PLEASE take a look, its not a huge code First, you need to start writing your code to less than 80 columns if you're going to keep posting it to usenet. I'm sure I'm not the only person who can't be bothered to unwrap it. Secondly, th

Python Greek mailing list [was Re: Why 'files.py' does not print the filenames into a table format?]

2013-06-15 Thread Steven D'Aprano
Nikos, Have you considered subscribing to this? http://mail.python.org/mailman/listinfo/python-greece Possibly some of these concepts will be easier for you to understand if explained to you in your native language. Or you might be able to join a local Users Group who can help you. -- Ste

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 4:10 πμ, Mark Lawrence wrote: I have no intention of kill-filing you, muting your threads or ignoring you. I do intend hounding you until with any luck you crawl off into a hole somewhere and leave this group in peace. No such luck i'm afraid for you. And it seems to me that you a

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 1:51 πμ, Chris Angelico wrote: On Sun, Jun 16, 2013 at 6:29 AM, Benjamin Schollnick wrote: cur.execute('''SELECT ID FROM counters WHERE url = %s''', page ) cur.execute('''INSERT INTO counters (url) VALUES (%s)''', page ) Sure, whoever wrote that code is a fool. http://xkcd.com/32

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 1:51 πμ, Chris Angelico wrote: On Sun, Jun 16, 2013 at 6:29 AM, Benjamin Schollnick wrote: cur.execute('''SELECT ID FROM counters WHERE url = %s''', page ) cur.execute('''INSERT INTO counters (url) VALUES (%s)''', page ) Sure, whoever wrote that code is a fool. http://xkcd.com/32

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Mark Lawrence
On 16/06/2013 02:03, Nick the Gr33k wrote: On 16/6/2013 12:29 πμ, Mark Lawrence wrote: On 15/06/2013 20:38, Nick the Gr33k wrote: Thank you and please whoever does not feel like helping, please at least not spam the thread. Your arrogance clearly has no bounds. Your spamming to my thread

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 1:51 πμ, Chris Angelico wrote: On Sun, Jun 16, 2013 at 6:29 AM, Benjamin Schollnick wrote: cur.execute('''SELECT ID FROM counters WHERE url = %s''', page ) cur.execute('''INSERT INTO counters (url) VALUES (%s)''', page ) Sure, whoever wrote that code is a fool. http://xkcd.com/32

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 12:29 πμ, Mark Lawrence wrote: On 15/06/2013 20:38, Nick the Gr33k wrote: Thank you and please whoever does not feel like helping, please at least not spam the thread. Your arrogance clearly has no bounds. Your spamming to my threads in an unproductive and yet bitching way ha

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Steven D'Aprano
On Sat, 15 Jun 2013 22:29:29 +0100, Mark Lawrence wrote: > Your arrogance clearly has no bounds. This is a public forum and people > can say what they like. You've wasted enough time as it is, so why > don't you simply bugger off. Congratulation. You have just entered an extremely exclusive clu

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Chris Angelico
On Sun, Jun 16, 2013 at 6:29 AM, Benjamin Schollnick wrote: > cur.execute('''SELECT ID FROM counters WHERE url = %s''', page ) > cur.execute('''INSERT INTO counters (url) VALUES (%s)''', page ) > > Sure, whoever wrote that code is a fool. > > http://xkcd.com/327/ > > They didn't sanitize your data

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Mark Lawrence
On 15/06/2013 20:38, Nick the Gr33k wrote: Thank you and please whoever does not feel like helping, please at least not spam the thread. Your arrogance clearly has no bounds. This is a public forum and people can say what they like. You've wasted enough time as it is, so why don't you sim

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Joshua Landau
large. This is fine; people here are volunteers. But you want help. So, Nick, listen. You need to learn how to ask *smart* questions. If you do, I *guarantee* that people will respect you a lot more. I'll be willing to give a bit of time to explain what I mean. 1) What is your problem. Not

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Benjamin Schollnick
>> Nick, at this point, you need to hire someone to do your work for you. > > The code is completely ready. > Some detail is missing and its not printing the files as expected. Then the code is not completely ready, it has bugs, and your trying to have the list debug and fix it for you for free.

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Nick the Gr33k
On 15/6/2013 10:46 μμ, Jarrod Henry wrote: Nick, at this point, you need to hire someone to do your work for you. The code is completely ready. Some detail is missing and its not printing the files as expected. Irrelevant to my question i just noticed weird behavior about my pelatologio.py sc

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Jarrod Henry
27;') > data = cur.fetchall() > > for url in data: > if url not in filenames: > # Delete spurious > cur.execute('''DELETE FROM files WHERE url = %s''', url ) > > > # ==**==

Why 'files.py' does not print the filenames into a table format?

2013-06-15 Thread Nick the Gr33k
not in filenames: # Delete spurious cur.execute('''DELETE FROM files WHERE url = %s''', url ) # = # Display ALL files, each with its own download button # ===

Re: PyWart: The problem with "print"

2013-06-12 Thread Joshua Landau
On 4 June 2013 14:35, Mark Lawrence wrote: > On 04/06/2013 14:29, rusi wrote: >> The Clash of the Titans >> >> Lé jmf chârgeth with mightƴ might >> And le Mond underneath trembleth >> Now RR mounts his sturdy steed >> And the windmill yonder turneth >> > > +1 funniest poem of the week :) Week? Do

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Mark Janssen
On 6/6/13, alex23 wrote: > On Jun 7, 11:44 am, Mark Janssen wrote: >> > Bulshytt. If you have no idea what polymorphism is, you shouldn't even >> > be participating in this conversation. >> >> I am aware of what it means, but Python doesn't really have it > > You really need to stop commenting wh

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread rusi
On Jun 7, 8:24 am, rusi wrote: > On Jun 7, 8:14 am, Mark Janssen wrote: > > > > > > > > > > > >> I am aware of what it means, but Python doesn't really have it (although > > >> it may evolve to it with annotations). > > > > No polymorphism huh? > > > > py> len([1, 2, 3])  # len works on lists > >

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Mark Janssen
> Fairly definitive terms have existed since 1985: > http://lucacardelli.name/Papers/OnUnderstanding.A4.pdf >> >> You are making an "outside view of a function" (until a better term is >> found). So that give you one possible view of polymorphism. However, >> *within* a class that I would write,

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread rusi
On Jun 7, 8:14 am, Mark Janssen wrote: > >> I am aware of what it means, but Python doesn't really have it (although > >> it may evolve to it with annotations). > > > No polymorphism huh? > > > py> len([1, 2, 3])  # len works on lists > > 3 > > py> len((1, 2))  # and on tuples > > 2 > > py> len({}

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Mark Janssen
>> I am aware of what it means, but Python doesn't really have it (although >> it may evolve to it with annotations). > > No polymorphism huh? > > > py> len([1, 2, 3]) # len works on lists > 3 > py> len((1, 2)) # and on tuples > 2 > py> len({}) # and on dicts > 0 > py> len('I pity the fool') #

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread rusi
On Jun 6, 11:44 pm, Devin Jeanpierre wrote: > > > Unfortunately* the halting problem stands. When generalized to Rice > > theorem it says that only trivial properties of programs are > > algorithmically decidable: > >http://mathworld.wolfram.com/RicesTheorem.html > > > And so the semantic correct

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Steven D'Aprano
On Thu, 06 Jun 2013 18:44:49 -0700, Mark Janssen wrote: >>> Python has seduced us all into lazy typing. That's what it is. >> >> Bulshytt. If you have no idea what polymorphism is, you shouldn't even >> be participating in this conversation. > > I am aware of what it means, but Python doesn't re

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread alex23
On Jun 7, 11:44 am, Mark Janssen wrote: > > Bulshytt. If you have no idea what polymorphism is, you shouldn't even > > be participating in this conversation. > > I am aware of what it means, but Python doesn't really have it You really need to stop commenting when you clearly have no understandin

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Mark Janssen
>> Python has seduced us all into lazy typing. That's what it is. > > Bulshytt. If you have no idea what polymorphism is, you shouldn't even > be participating in this conversation. I am aware of what it means, but Python doesn't really have it (although it may evolve to it with annotations). Bu

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Dan Stromberg
On Thu, Jun 6, 2013 at 9:49 AM, Rick Johnson wrote: > Congrats: Again you join the ranks of most children who make excuses for > their foolish actions along the lines of: > > "Hey, they did it first!" > > Well, the lemmings get what they deserve i suppose. > Lemmings don't really jump off cliffs

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread alex23
On Jun 7, 2:39 am, Devin Jeanpierre wrote: > Languages do not exist in a vacuum. They do if all you use them for is academic point scoring over practical purposes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread alex23
On Jun 7, 3:59 am, Mark Janssen wrote: > Okay, I'm going straighten out you foo(l)s once and for all. Gosh, really?! THANKS. > Python has seduced us all into lazy typing.  That's what it is. Bulshytt. If you have no idea what polymorphism is, you shouldn't even be participating in this conversa

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Devin Jeanpierre
Super OT divergence because I am a loser nerd: On Thu, Jun 6, 2013 at 1:27 PM, rusi wrote: > Yes, all programming communities have blind-spots. The Haskell > community's is that Haskell is safe and safe means that errors are > caught at compile-time. I don't think Haskell people believe this wi

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Rick Johnson
On Thursday, June 6, 2013 1:03:24 PM UTC-5, Rick Johnson wrote: > The second covers type checking objects that enter into new > namespaces. That would cover all functions/methods arguments > (at a minimum). Yeah, before anyone starts complaining about this, i meant to say "scope". Now you can

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Russ P.
On Thursday, June 6, 2013 2:29:02 AM UTC-7, Steven D'Aprano wrote: > On Thu, 06 Jun 2013 12:29:44 +1000, Chris Angelico wrote: > > > > > On Thu, Jun 6, 2013 at 11:56 AM, Steven D'Aprano > > > wrote: > > >> On Wed, 05 Jun 2013 14:59:31 -0700, Russ P. wrote: > > >>> As for Python, my experienc

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Rick Johnson
On Wednesday, June 5, 2013 8:37:20 PM UTC-5, Steven D'Aprano wrote: > On Wed, 05 Jun 2013 09:15:01 -0700, Russ P. wrote: > > On Wednesday, June 5, 2013 1:59:01 AM UTC-7, Mark Lawrence wrote: > >> On 05/06/2013 07:11, Russ P. wrote: > What prevents bugs is the skill of the people writing the code,

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Mark Janssen
> Whatever benefit there is in declaring the type of a function is lost due > to the inability to duck-type or program to an interface. There's no type > that says "any object with a 'next' method", for example. And having to > declare local variables is a PITA with little benefit. > > Give me a la

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Grant Edwards
On 2013-06-06, Chris Angelico wrote: > Would you say that doubling the testing period is a good thing or a > bad thing? It could be a neutral thing (ignoring the costs involved). I once read read an article claiming that as you test (and fix) any large, complex piece of software, you asymptotic

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread rusi
On Jun 6, 9:08 pm, Robert Kern wrote: > On 2013-06-06 16:41, Chris Angelico wrote: > > > Anyway, regardless of your language, there's always some criteria that > > can't be coded. Suppose the valid input for a function were "integers > > whose square roots are integers but whose cube roots are not

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Chris Angelico
On Fri, Jun 7, 2013 at 2:49 AM, Rick Johnson wrote: > On Wednesday, June 5, 2013 2:15:57 AM UTC-5, Chris Angelico wrote: >> [...] >> I cannot name a single modern programming language that does NOT have >> some kind of implicit boolification. > > Congrats: Again you join the ranks of most children

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Rick Johnson
On Wednesday, June 5, 2013 2:15:57 AM UTC-5, Chris Angelico wrote: > [...] > I cannot name a single modern programming language that does NOT have > some kind of implicit boolification. Congrats: Again you join the ranks of most children who make excuses for their foolish actions along the lines

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Devin Jeanpierre
On Thu, Jun 6, 2013 at 12:24 PM, Rick Johnson wrote: > In Python, if you fail to use the return statement, then Python will return > None, NOT some some value that just happens to be the last line executed in > the function -- Ruby breaks the law of least astonishment. Ruby comes from a traditi

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Rick Johnson
On Wednesday, June 5, 2013 6:18:13 PM UTC-5, Michael Torrie wrote: > On 06/05/2013 12:11 AM, Russ P. wrote: > > But then, what would you expect of a language that allows you to > > write > > x = 1 > > x = "Hello" > > It's all loosey goosey -- which is fine for many applications but > > certainly n

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Robert Kern
On 2013-06-06 16:41, Chris Angelico wrote: Anyway, regardless of your language, there's always some criteria that can't be coded. Suppose the valid input for a function were "integers whose square roots are integers but whose cube roots are not". You won't easily get compile-time checking of tha

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Chris Angelico
On Fri, Jun 7, 2013 at 1:49 AM, Rick Johnson wrote: > On Wednesday, June 5, 2013 11:59:07 AM UTC-5, Chris Angelico wrote: > >> Frankly, I don't think the language much matters. It's all >> down to the skill of the programmers and testers. Ada >> wasn't the source of the problem unless Ada has a bu

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Rick Johnson
On Wednesday, June 5, 2013 11:59:07 AM UTC-5, Chris Angelico wrote: > Frankly, I don't think the language much matters. It's all > down to the skill of the programmers and testers. Ada > wasn't the source of the problem unless Ada has a bug in > it... which is going to be true of pretty much any >

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Chris Angelico
On Fri, Jun 7, 2013 at 1:35 AM, Robert Kern wrote: > On 2013-06-06 10:45, Chris Angelico wrote: > >> For the "accept any object that has a next() method" sorts of rules, I >> don't know of any really viable system that does that usefully. The >> concept of implementing interfaces in Java comes clo

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Chris Angelico
On Fri, Jun 7, 2013 at 1:36 AM, rusi wrote: > On Jun 6, 8:26 pm, Chris Angelico wrote: >> On Fri, Jun 7, 2013 at 12:09 AM, rusi wrote: >> > When we switched from to python (via Scheme and a haskell- >> > predecessor), I dont remember ever getting a segmentation fault. >> >> Oh, it's easy to segf

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread rusi
On Jun 6, 8:26 pm, Chris Angelico wrote: > On Fri, Jun 7, 2013 at 12:09 AM, rusi wrote: > > When we switched from to python (via Scheme and a haskell- > > predecessor), I dont remember ever getting a segmentation fault. > > Oh, it's easy to segfault Python. > > import sys > sys.setrecursionlimit(

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Robert Kern
On 2013-06-06 10:45, Chris Angelico wrote: For the "accept any object that has a next() method" sorts of rules, I don't know of any really viable system that does that usefully. The concept of implementing interfaces in Java comes close, but the class author has to declare that it's implementing

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Chris Angelico
On Fri, Jun 7, 2013 at 12:09 AM, rusi wrote: > When we switched from to python (via Scheme and a haskell- > predecessor), I dont remember ever getting a segmentation fault. Oh, it's easy to segfault Python. import sys sys.setrecursionlimit(9) def foo(): foo() foo() :) ChrisA -- http:

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread rusi
On Jun 6, 6:45 am, Chris Angelico wrote: > On Thu, Jun 6, 2013 at 11:37 AM, Steven D'Aprano > > wrote: > > What prevents bugs is the skill of the people writing the code, not the > > compiler. > > +1 QOTW. In many Indian languages there is a saying: A poor dancer blames the crooked floor. [Yeah…

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Serhiy Storchaka
06.06.13 12:45, Chris Angelico написав(ла): For the "accept any object that has a next() method" sorts of rules, I don't know of any really viable system that does that usefully. The concept of implementing interfaces in Java comes close, but the class author has to declare that it's implementing

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Chris Angelico
On Thu, Jun 6, 2013 at 7:29 PM, Steven D'Aprano wrote: > Whatever benefit there is in declaring the type of a function is lost due > to the inability to duck-type or program to an interface. There's no type > that says "any object with a 'next' method", for example. And having to > declare local v

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread Steven D'Aprano
On Thu, 06 Jun 2013 12:29:44 +1000, Chris Angelico wrote: > On Thu, Jun 6, 2013 at 11:56 AM, Steven D'Aprano > wrote: >> On Wed, 05 Jun 2013 14:59:31 -0700, Russ P. wrote: >>> As for Python, my experience with it is that, as your application >>> grows, you start getting confused about what the ar

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Ian Kelly
On Wed, Jun 5, 2013 at 10:25 PM, Russ P. wrote: > I recall reading a few years ago that Guido was thinking about adding > optional type annotations. I don't know if that went anywhere or not, but I > thought it was a good idea. Eventually I got tired of waiting, and I realized > that I just wan

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 7:29:44 PM UTC-7, Chris Angelico wrote: > On Thu, Jun 6, 2013 at 11:56 AM, Steven D'Aprano > > wrote: > > > On Wed, 05 Jun 2013 14:59:31 -0700, Russ P. wrote: > > >> As for Python, my experience with it is that, as > > >> your application grows, you start getting con

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Chris Angelico
On Thu, Jun 6, 2013 at 11:56 AM, Steven D'Aprano wrote: > On Wed, 05 Jun 2013 14:59:31 -0700, Russ P. wrote: >> As for Python, my experience with it is that, as >> your application grows, you start getting confused about what the >> argument types are or are supposed to be. > > Whereas people neve

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Steven D'Aprano
On Wed, 05 Jun 2013 14:59:31 -0700, Russ P. wrote: > I'm not an Ada guy, but Ada advocates claim that it reduces development > time by half in the long run compared to C and C++ due to reduced > debugging time and simpler maintenance. They may be right. Far too many people think that C and C++

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Chris Angelico
On Thu, Jun 6, 2013 at 11:37 AM, Steven D'Aprano wrote: > What prevents bugs is the skill of the people writing the code, not the > compiler. +1 QOTW. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Steven D'Aprano
On Wed, 05 Jun 2013 09:15:01 -0700, Russ P. wrote: > On Wednesday, June 5, 2013 1:59:01 AM UTC-7, Mark Lawrence wrote: >> On 05/06/2013 07:11, Russ P. wrote: >> >> > But then, what would you expect of a language that allows you to >> > write >> > >> > x = 1 >> > x = "Hello" >> > >> > It's all loo

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Michael Torrie
On 06/05/2013 05:52 PM, Russ P. wrote: > My comment shows you nothing about what I understand about names, > objects, and variables. Yes that probably is true. > You have chosen to question my understanding apparently because my > point bothered you but you don't have a good reply. Then you link

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 4:18:13 PM UTC-7, Michael Torrie wrote: > On 06/05/2013 12:11 AM, Russ P. wrote: > > > But then, what would you expect of a language that allows you to > > > write > > > > > > x = 1 > > > x = "Hello" > > > > > > It's all loosey goosey -- which is fine for many a

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Michael Torrie
On 06/05/2013 12:11 AM, Russ P. wrote: > But then, what would you expect of a language that allows you to > write > > x = 1 > x = "Hello" > > It's all loosey goosey -- which is fine for many applications but > certainly not for critical ones. This comment shows me that you don't understand the

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 9:59:07 AM UTC-7, Chris Angelico wrote: > On Thu, Jun 6, 2013 at 2:15 AM, Russ P. wrote: > > > On Wednesday, June 5, 2013 1:59:01 AM UTC-7, Mark Lawrence wrote: > > >> I want to launch this rocket with an expensive satellite on top. I know > > >> > > >> it's safe as

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Chris Angelico
On Thu, Jun 6, 2013 at 2:15 AM, Russ P. wrote: > On Wednesday, June 5, 2013 1:59:01 AM UTC-7, Mark Lawrence wrote: >> I want to launch this rocket with an expensive satellite on top. I know >> >> it's safe as the code is written in ADA. Whoops :( > > > So Python would have been a better choice?

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 1:59:01 AM UTC-7, Mark Lawrence wrote: > On 05/06/2013 07:11, Russ P. wrote: > > > > > But then, what would you expect of a language that allows you to write > > > > > > x = 1 > > > x = "Hello" > > > > > > It's all loosey goosey -- which is fine for many applicati

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Terry Jan Reedy
On 6/5/2013 2:11 AM, Russ P. wrote: But then, what would you expect of a language that allows you to write x = 1 > x = "Hello" It's all loosey goosey -- which is fine for many applications but certainly not for critical ones. I believe Shedskin, a Python *subset* compiler*, will reject tha

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Mark Lawrence
On 05/06/2013 07:11, Russ P. wrote: But then, what would you expect of a language that allows you to write x = 1 x = "Hello" It's all loosey goosey -- which is fine for many applications but certainly not for critical ones. I want to launch this rocket with an expensive satellite on top.

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Russ P.
On Wednesday, June 5, 2013 12:15:57 AM UTC-7, Chris Angelico wrote: > On Wed, Jun 5, 2013 at 4:11 PM, Russ P. wrote: > > > On Tuesday, June 4, 2013 8:44:11 AM UTC-7, Rick Johnson wrote: > > > > > >> Yes, but the problem is not "my approach", rather the lack > > >> > > >> of proper language des

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-05 Thread Chris Angelico
On Wed, Jun 5, 2013 at 4:11 PM, Russ P. wrote: > On Tuesday, June 4, 2013 8:44:11 AM UTC-7, Rick Johnson wrote: > >> Yes, but the problem is not "my approach", rather the lack >> >> of proper language design (my apologizes to the "anointed >> >> one". ;-) > > If you don't like implicit conversion

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Russ P.
On Tuesday, June 4, 2013 8:44:11 AM UTC-7, Rick Johnson wrote: > Yes, but the problem is not "my approach", rather the lack > > of proper language design (my apologizes to the "anointed > > one". ;-) If you don't like implicit conversion to Boolean, then maybe you should be using another langu

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread alex23
On Jun 5, 3:28 pm, Steven D'Aprano wrote: > How many years has Rick been coming here, proclaiming loudly [a]nd yet, > he still has no clue what > actually means. It's not just duck typing. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Steven D'Aprano
On Wed, 05 Jun 2013 02:27:26 +1000, Chris Angelico wrote: > On Wed, Jun 5, 2013 at 2:19 AM, Rick Johnson > wrote: >> On Jun 4, 11:00 am, Chris Angelico wrote: >>> You know, if you want a language with strict type declarations and >>> extreme run-time efficiency, there are some around. >> >> I do

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Michael Torrie
On 06/04/2013 05:21 PM, Rick Johnson wrote: > If you still feel that this idea is garbage, then, keep on writing > your sloppy code. My proposal is the best method to handle the > problems that arise with duck typed languages in a manner that is not > restrictive or laborious -- it's actually quite

Re: PyWart: The problem with "print"

2013-06-04 Thread Steven D'Aprano
On Tue, 04 Jun 2013 05:23:19 -0700, jmfauth wrote: > How is is possible to arrive to such a situation ? The answer if far > beyond my understanding Truer words have never been spoken. > (although I have my opinion on the subject). http://en.wikipedia.org/wiki/Dunning–Kruger_effect -- Stev

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread alex23
On Jun 5, 2:09 am, Rick Johnson wrote: > This is how you design a language for consistency and readability. Great! Now you can shut up and get back to work on RickPython4000. Come back and let us know all about it when it's done. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Mark Lawrence
On 05/06/2013 00:21, Rick Johnson wrote: [snip] Would you be kind enough not to smoke too much wacky baccy before posting, thanks. -- "Steve is going for the pink ball - and for those of you who are watching in black and white, the pink is next to the green." Snooker commentator 'Whispering'

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Rick Johnson
svalid(1, int) True py> isvalid({}, dict) False py> isvalid("", str) False py> isvalid(" ", str) True Now, let's go back to my earlier example of where i was expecting a list but got a string instead. If i use Python's current implicit conversion to Boolean

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Ian Kelly
On Tue, Jun 4, 2013 at 9:44 AM, Rick Johnson wrote: > It is my firm belief that truth testing a value that is not > a Boolean should raise an exception. If you want to convert > a type to Boolean then pass it to the bool function: > > lst = [1,2,3] > if bool(lst): > do_something >

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Jason Swails
On Tue, Jun 4, 2013 at 11:44 AM, Rick Johnson wrote: > > This implicit conversion seems like a good idea at first, > and i was caught up in the hype myself for some time: "Hey, > i can save a few keystrokes, AWESOME!". However, i can tell > you with certainty that this implicit conversion is folly

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Ned Batchelder
On 6/4/2013 12:19 PM, Rick Johnson wrote: On Jun 4, 11:00 am, Chris Angelico wrote: You know, if you want a language with strict type declarations and extreme run-time efficiency, there are some around. I don't like declaring types everywhere, i hate it. I prefer duck typed languages, HOWEVER

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Chris Angelico
On Wed, Jun 5, 2013 at 2:19 AM, Rick Johnson wrote: > On Jun 4, 11:00 am, Chris Angelico wrote: >> You know, if you want a language with strict type declarations and >> extreme run-time efficiency, there are some around. > > I don't like declaring types everywhere, i hate it. I prefer duck > type

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Rick Johnson
On Jun 4, 11:00 am, Chris Angelico wrote: > You know, if you want a language with strict type declarations and > extreme run-time efficiency, there are some around. I don't like declaring types everywhere, i hate it. I prefer duck typed languages, HOWEVER, in order for duck typing to work consist

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Rick Johnson
On Jun 4, 10:44 am, Rick Johnson wrote: > What we need is a method by which we can validate a symbol > and simultaneously do the vaidation in a manner that will > cast light on the type that is expected. In order for this > to work, you would need validators with unique "type names" > >     if va

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Fábio Santos
On 4 Jun 2013 17:04, "Chris Angelico" wrote: > > On Wed, Jun 5, 2013 at 1:44 AM, Rick Johnson > wrote: > > But we are really ignoring the elephant in the room. Implict > > conversion to Boolean is just a drop in the bucket compared > > to the constant "shell game" we are subjected to when > > rea

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Chris Angelico
On Wed, Jun 5, 2013 at 1:44 AM, Rick Johnson wrote: > But we are really ignoring the elephant in the room. Implict > conversion to Boolean is just a drop in the bucket compared > to the constant "shell game" we are subjected to when > reading source code. We so naively believe that a symbol > name

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread Rick Johnson
On Tuesday, June 4, 2013 12:39:59 AM UTC-5, Steven D'Aprano wrote: > On Mon, 03 Jun 2013 18:37:24 -0700, Rick Johnson wrote: > Consider a simple thought experiment. Suppose we start with a sequence of > if statements that begin simple and get more complicated: > if a == 1: ... > if a == 1 and b >

Re: PyWart: The problem with "print"

2013-06-04 Thread Mark Lawrence
On 04/06/2013 14:29, rusi wrote: On Jun 4, 5:23 pm, jmfauth wrote: On 2 juin, 20:09, Rick Johnson wrote: I never purposely inject ANY superfluous cycles in my code except in the case of testing or development. To me it's about professionalism. Let's consider a thought exercise shall we?

Re: PyWart: The problem with "print"

2013-06-04 Thread rusi
On Jun 4, 5:23 pm, jmfauth wrote: > On 2 juin, 20:09, Rick Johnson wrote: > > > > > I never purposely inject ANY superfluous cycles in my code except in > > the case of testing or development. To me it's about professionalism. > > Let's consider a thought exercise shall we? > > > > The f

Re: PyWart: The problem with "print"

2013-06-04 Thread jmfauth
On 2 juin, 20:09, Rick Johnson wrote: > > > > > > I never purposely inject ANY superfluous cycles in my code except in > the case of testing or development. To me it's about professionalism. > Let's consider a thought exercise shall we? > The flexible string representation is the per

Re: PyWart: The problem with "print"

2013-06-04 Thread Chris Angelico
On Tue, Jun 4, 2013 at 11:37 AM, Rick Johnson wrote: > The print function is the very definition of a "syntactic sugar". > > For example: > print("some sting") > > is much more readable than: > > sys.stdout.write("some string"+"\n

Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-03 Thread Steven D'Aprano
>> > function called "debugprint" that looks like this: >> > > def debugprint(*args): >> > if DEBUG == True: >> > print(*args) >> >> No no no, that's not how you do it. It should be: >> if DEBUG == True =

Re: PyWart: The problem with "print"

2013-06-03 Thread Steven D'Aprano
On Tue, 04 Jun 2013 05:16:13 +0200, Vito De Tullio wrote: > Rick Johnson wrote: > >> Take your >> standard yes/no/cancel dialog, i would expect it to return >> True|False|None respectively, > > you clearly mean True / False / FileNotFound. > > ( http://thedailywtf.com/Articles/What_Is_Truth_0x3

<    2   3   4   5   6   7   8   9   10   11   >