Re: Message passing syntax for objects | OOPv2

2013-05-11 Thread D';Arcy J.M. Cain
On Thu, 9 May 2013 11:33:45 -0600 Ian Kelly wrote: > about Turing machines and lambda calculus that you've injected into > the conversation though just reminds me of the "Einstein was wrong" > cranks. But Einstein *was* wrong. http://www.xkcd.com/120

Re: Unicode humor

2013-05-15 Thread D';Arcy J.M. Cain
said "The French don't even have a word for entrepreneur." -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 788 2246 (DoD#0082)(eNTP) | what's for dinner. IM: da...@vex.net, VOIP:

Re: .mat files processing in Python

2013-06-12 Thread D';Arcy J.M. Cain
ailing list that gets archived. Please don't ever do that again. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 788 2246 (DoD#0082)(eNTP) | what's for dinner. IM: da...@vex.net, VOIP:

Re: Don't feed the troll... (was: Re: A few questiosn about encoding)

2013-06-14 Thread D';Arcy J.M. Cain
ush back I get is that then people would get two copies of the email, one to them and one to the list. My answer is simple. Get a proper email system that filters out duplicates. Is there an email client out there that does not have this facility? -- D'Arcy J.M. Cain | Dem

Re: Don't feed the troll

2013-06-14 Thread D';Arcy J.M. Cain
On Sat, 15 Jun 2013 03:31:12 +1000 Chris Angelico wrote: > On Sat, Jun 15, 2013 at 3:13 AM, D'Arcy J.M. Cain > wrote: > > I have suggested this before but the push back I get is that then > > people would get two copies of the email, one to them and one to the > &g

Re: Don't feed the troll

2013-06-14 Thread D';Arcy J.M. Cain
hat I am using. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 788 2246 (DoD#0082)(eNTP) | what's for dinner. IM: da...@vex.net, VOIP: sip:da...@vex.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-06-15 Thread D';Arcy J.M. Cain
ested "reply to all”. I suggested including the poster that you are replying to. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 788 2246 (DoD#0082)(eNTP) | what's for dinner. IM: da...@v

Re: Don't feed the troll...

2013-06-15 Thread D';Arcy J.M. Cain
t to the mailing list. Your MTA sends the other one directly so Steve is correct. He gets two copies. If his client doesn't suppress the duplicate then he will be presented with both. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/

Re: Don't feed the troll...

2013-06-17 Thread D';Arcy J.M. Cain
On 15 Jun 2013 15:40:35 GMT Steven D'Aprano wrote: > On Sat, 15 Jun 2013 07:58:27 -0400, D'Arcy J.M. Cain wrote: > > I suggested including the poster that you are replying to. > > In the name of all that's good and decent in the world, why on earth > would you d

Re: Don't feed the troll...

2013-06-17 Thread D';Arcy J.M. Cain
that this list is just more noise to signal than I care to deal with. If anyone has any comments for me you will have to Cc me as I am outa here. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 788 2246

Re: for-loop on cmd-line

2012-10-11 Thread D';Arcy J.M. Cain
i += 1 > > into a one-line python command (in a .bat file): Is "one liner" an actual requirement or is the requirement to run it from the command line? python -c " import sys i = 0 for p in sys.path: print('sys.path[%2d]: %s' % (i, p)) i+=1 " I don&

Re: Preventing crap email from google?

2012-10-22 Thread D';Arcy J.M. Cain
s All Text!" plugin. Not sure if it is available for other browsers. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. IM: da...@vex.net

Re: Preventing crap email from google?

2012-10-22 Thread D';Arcy J.M. Cain
gmail account to post to the mailing list through. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. IM: da...@vex.net -- http://mail.python.org/

Re: Python Interview Questions

2012-11-18 Thread D';Arcy J.M. Cain
never needed to use one as a dictionary key. Well, as long as *you* never needed it then... CellBlock = 9 # There's a riot going on... Cell = 17 Bunk = "top" Prisoner = {(CellBlock, Cell, Bunk): "Bernie Madoff"} -- D'Arcy J.M. Cain | Democracy is three wolves

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2012-12-12 Thread D';Arcy J.M. Cain
r code review :) I think by posting it he sort of did. He should probably grow a thicker skin before he does so again though. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNT

Re: Running a python script under Linux

2012-12-14 Thread D';Arcy J.M. Cain
long as you only run on one system that's OK. That won't work on NetBSD or Linux[1] for example. > There are situations where using #!/usr/bin/env makes sense, > but yours isn't one of them. #! /usr/bin/env python2.7 [1]: Well, Ubuntu anyway. I don't know about the ot

Re: Can't seem to start on this

2013-01-03 Thread D';Arcy J.M. Cain
ould be left out if we wanted the default of 7, var3 is overwritten in MyClass and var4 is changed after the class is instantiated. Hope this gives you some ideas. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. IM: da...@vex.net -- http://mail.python.org/mailman/listinfo/python-list

PyGreSQL 4.1 released

2013-01-03 Thread D';Arcy J.M. Cain
- FreeBSD - openSUSE 12.2 - Windows 7 with both MinGW and Visual Studio - PostgreSQL 8.4, 9.0 and 9.2 32 and 64bit - Python 2.5, 2.6 and 2.7 32 and 64bit -- D'Arcy J.M. Cain PyGreSQL Development Group http://www.PyGreSQL.org IM:da...@vex.net -- http://mail.python.org/mailman/listinfo/p

Re: Can't seem to start on this

2013-01-03 Thread D';Arcy J.M. Cain
en maybe the user shouldn't be writing any Python code and instead look at the various ways of parsing configuration files which they can write. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. IM: da...@vex.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't seem to start on this

2013-01-03 Thread D';Arcy J.M. Cain
updated instead of "A". Actually "A" will > not be part of the packaged program. Or "A" becomes the script that parses the config file and runs the other code. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| a

Re: PyGreSQL 4.1 released

2013-01-03 Thread D';Arcy J.M. Cain
. The classic one is basically the one PyGreSQL started life as before we had a standard interface. We kept it as it has some advantages over the portable one but offer both. As for other advantages, I prefer to hear those from people not involved with either project. -- D'Arcy J.M. Cain

Re: PyGreSQL 4.1 released

2013-01-05 Thread D';Arcy J.M. Cain
e will probably get version 4.2 released shortly and then branch 5.x and start working on Python 3 support. -- D'Arcy J.M. Cain PyGreSQL Development Group http://www.PyGreSQL.org IM:da...@vex.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Proof that nobody reads the tests

2013-01-06 Thread D';Arcy J.M. Cain
On Sun, 6 Jan 2013 05:26:19 -0800 (PST) chaouche yacine wrote: > Oh :) sorry I didn't know they were references to monty python > sketches. That explains it then :) The name of the language itself is a reference to Monty Python. That is specifically what it was named after. --

Re: PyGreSQL 4.1 released

2013-01-06 Thread D';Arcy J.M. Cain
On Sat, 5 Jan 2013 08:44:17 -0500 "D'Arcy J.M. Cain" wrote: > We will probably get version 4.2 released shortly and then branch 5.x > and start working on Python 3 support. In fact, we found a few buglets and will be releasing 4.1.1 on Tuesday. -- D'Arcy J.M. Cai

New version of PyGreSQL 4.1.1 - bug fixes

2013-01-08 Thread D';Arcy J.M. Cain
- FreeBSD - openSUSE 12.2 - Windows 7 with both MinGW and Visual Studio - PostgreSQL 8.4, 9.0 and 9.2 32 and 64bit - Python 2.5, 2.6 and 2.7 32 and 64bit | D'Arcy J.M. Cain | da...@pygresql.org -- D'Arcy J.M. Cain PyGreSQL Development Group http://www.PyGreSQL.org IM:da...@vex.ne

Re: PyWart: Module access syntax

2013-01-14 Thread D';Arcy J.M. Cain
the list? That way those of us who filter out the trolls can filter out the responses to them as well. Thanks for understanding. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNT

Re: PyWart (Terminolgy): "Class"

2013-01-14 Thread D';Arcy J.M. Cain
On 15 Jan 2013 02:08:38 GMT Steven D'Aprano wrote: > > Rick Johnson is a well-known troll. > > I disagree that Rick is a troll. Trolling requires that the troll Doesn't matter. He duck types as one. -- D'Arcy J.M. Cain | Democracy is three wolves

Re: Converting a string to a number by using INT (no hash method)

2013-01-22 Thread D';Arcy J.M. Cain
. In fact, if you have 10,001 files it is absolutely guaranteed to have at least one duplicate entry. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for

Re: how to avoid leading white spaces

2011-06-03 Thread D';Arcy J.M. Cain
former is what you want but I think that the latter would be more common. > There's no need to use a regex just because you think that you *might*, > someday, possibly need a regex. That's just silly. If and when > requirements change, then use a regex. Until then, write the simples

Re: Running a Python script on a web server

2011-06-07 Thread D';Arcy J.M. Cain
or compiled C) programs on a web server that offers Python http://www.Vex.Net/ and when someone clicks on the link the server runs them and presents the results. This is different than something like Java or Javascript that runs in the browser. If that still doesn't answer your question

Re: Function declarations ?

2011-06-08 Thread D';Arcy J.M. Cain
ou are trying to solve and maybe we can suggest a solution. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can someone help please

2011-07-21 Thread D';Arcy J.M. Cain
est in > the body of the email which i don't want. I would like all the txt files in > the body of an email > >> total = ' ' Change this to: total = '\n' You just need a blank line between the headers and the body of the email message. -- D'Arcy J.M

Re: List spam

2011-08-18 Thread D';Arcy J.M. Cain
ce. Mailman makes it pretty simple to manage too. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Stop quoting spam [was Re: Hot Girls ...]

2011-08-19 Thread D';Arcy J.M. Cain
f php, red hat, and perl can manage it for their lists, why not python? Is > that a statement about python programmers? And that should get you blacklisted by anyone on the cusp. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/|

Re: Stop quoting spam [was Re: Hot Girls ...]

2011-08-20 Thread D';Arcy J.M. Cain
On Fri, 19 Aug 2011 17:10:49 -0400 Rodrick Brown wrote: > It's not the end of the world calm down I thought it was quite funny for a > friday joke! The first message might have been funny (if you are twelve) but the rest were annoying and insulting. -- D'Arcy J.M. Cain

Re: Stop quoting spam [was Re: Hot Girls ...]

2011-08-20 Thread D';Arcy J.M. Cain
us why it is OK to repeat spam with all the spammy URLS intact By the way, my joke above is hilarious. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinne

Really, stop repeating spam! (Was: Hot Girls...)

2011-08-20 Thread D';Arcy J.M. Cain
ting you replied to? Are you two actually in cahoots with the spammer? Wait, I get it. The spammer, Matty and you are all on gmail. You are all the same person, aren't you? -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sh

Re: Record seperator

2011-08-26 Thread D';Arcy J.M. Cain
On 26 Aug 2011 18:39:07 GMT greymaus wrote: > > Is there an equivelent for the AWK RS in Python? > > > as in RS='\n\n' > will seperate a file at two blank line intervals open("file.txt").read().split("\n\n") -- D'Arcy J.M. Cain

Re: Python fails on math

2011-02-24 Thread D';Arcy J.M. Cain
just to gather all the students into the auditorium? -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Just finished reading of "What’s New In Python 3.0"

2011-03-14 Thread D';Arcy J.M. Cain
lls. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: value of pi and 22/7

2011-03-19 Thread D';Arcy J.M. Cain
On Fri, 18 Mar 2011 13:45:47 +0100 Stefan Behnel wrote: > Neil Cerutti, 18.03.2011 13:17: > > RIIght. What's a cubit? > > http://en.wikipedia.org/wiki/Cubit I don't believe that Neil was asking a serious question. http://www.youtube.com/watch?v=so9o3_da

Re: Help with regex needed

2011-04-12 Thread D';Arcy J.M. Cain
if nnn[2] == mon and nnn[3] = day and nnn[4] = year: If strip() were needed you could leave off the argument. The default is to strip all whitespace from both ends. In fact, read up on locales to see why it is a good idea to omit the argument. -- D'Arcy J.M. Cain | Democracy is t

Re: Help with regex needed

2011-04-12 Thread D';Arcy J.M. Cain
ne ? The number of loops is still the number of objects (strings) in hhh. The only difference is that in the former case you need to split the variable inside the loop causing the production and destruction of an extra object. Be careful though. You can optimize your loops by doing too much in the f

Re: Feature suggestion -- return if true

2011-04-17 Thread D';Arcy J.M. Cain
eate and destroy objects needlessly. def get_from_cache(x): if not x in cache: cache[x] = compute_from(x) return cache[x] -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)

Re: Read-write lock for Python

2011-04-28 Thread D';Arcy J.M. Cain
sking questions. Don't pre-suppose the answer. http://www.catb.org/~esr/faqs/smart-questions.html is always a good read in these situations. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (

Re: [OT] From svn to something else?

2011-04-29 Thread D';Arcy J.M. Cain
nd history intact. Anyone know how to go the other way? I recently converted all my projects over to svn from cvs and then took over another project that uses bzr. I would prefer everything to be in the same system. -- D'Arcy J.M. Cain | Democracy is three wolves http

Re: checking if a list is empty

2011-05-11 Thread D';Arcy J.M. Cain
d trucks be built so that drivers don't have to learn how to split shift? Why is programming so different that we can't expect people to actually learn their discipline? This discussion is giving me some insight into some of the crap programming I see these days. -- D'Arcy J.M.

Re: checking if a list is empty

2011-05-11 Thread D';Arcy J.M. Cain
bility is nothing short of revolutionary. I suppose one day a reasoning android will be able to sit down at the terminal of a star ship computer and ask simple questions while making random hand movements across a screen but for now I am afraid that programmers still have to learn programm

Re: checking if a list is empty

2011-05-11 Thread D';Arcy J.M. Cain
On Wed, 11 May 2011 16:24:47 -0500 harrismh777 wrote: > D'Arcy J.M. Cain wrote: > Non-programmers should not be expected to program in 'C' nor in lisp... > > ... but non-programmers were able to program in BASIC jes fine... They still had to learn the lang

Re: obviscating python code for distribution

2011-05-17 Thread D';Arcy J.M. Cain
t; decades, and partly because quite a few of the things I was working > with are completely undocumented! Sounds like a perfect reason to open source it. If what you say is true it could benefit you more than others, at least at the beginning. Remember, open source is a two way stre

Re: How To Make Fast Money Legally

2011-05-18 Thread D';Arcy J.M. Cain
On Wed, 18 May 2011 12:06:07 -0700 (PDT) "tmac641...@yahoo.com" wrote: > HOW TO MAKE EASY MONEY FAST AND LEGALLY Wow! Was this stuck in someone's mail queue since 1992? -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/

Re: Why did Quora choose Python for its development?

2011-05-24 Thread D';Arcy J.M. Cain
ion. > And again, I am not trolling anything. I am just defending a language which > has a clearer syntax for doing some things, and a shorter code for other Are Perl programmers aware of some imminent worldwide shortage of electrons that Python programmers are not? Why is there this obsession w

Re: Why did Quora choose Python for its development?

2011-05-24 Thread D';Arcy J.M. Cain
On Tue, 24 May 2011 00:17:55 -0500 John Bokma wrote: > > $d = @a; > > That will give you the number of elements in @a. What you (probably) > mean is %hash = @array; If I was even considering using Perl, this one exchange would send me screaming in the opposite direction. -- D

Re: Why did Quora choose Python for its development?

2011-05-24 Thread D';Arcy J.M. Cain
programming languages. Same here but someone (I don't even know who started it) felt that it was necessary to tell us all why their language was better. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-24 Thread D';Arcy J.M. Cain
an I would feel any need to go to a Perl group and start trying to convert them. Bottom line - they did a study once (sorry, can't point to it any more) to determine the best tool for development. Turns out that the most productive tool was generally the one that the user believed was the most p

Re: Why did Quora choose Python for its development?

2011-05-25 Thread D';Arcy J.M. Cain
range. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: The worth of comments

2011-05-27 Thread D';Arcy J.M. Cain
ar wasn't enough entertainment for you? ;-) -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner needs advice

2011-05-28 Thread D';Arcy J.M. Cain
quot;Completely incompatible" and "many subtle differences" is about the size of the Grand Canyon. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: I am new to python. I have a few questions coming from an armature!

2016-08-17 Thread D';Arcy J.M. Cain
On Wed, 17 Aug 2016 16:39:30 +1000 Steven D'Aprano wrote: > cond ? trueval : falseval > > Because the C syntax is horrifically ugly, whereas the Python syntax > is very close to real English syntax. Or, put another way, Python prefers English over line noise. --

Re: Multimeter USB output

2016-08-30 Thread D';Arcy J.M. Cain
till have it in the basement. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Altair

2016-08-30 Thread D';Arcy J.M. Cain
On Tue, 30 Aug 2016 15:56:07 +0200 Joe wrote: > Am 30.08.2016 um 13:01 schrieb D'Arcy J.M. Cain: > > On Mon, 29 Aug 2016 21:21:05 -0700 > > Larry Hudson via Python-list wrote: > >> I remember it well. It's what I used to initially learn C. I'm a > &

Re: [OT] Altair

2016-08-30 Thread D';Arcy J.M. Cain
disk. When I finally upgraded to a whopping 64K of RAM (with a Morrow S-100 memory board) I had to blank out the section where the disk controller sat in memory. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.

Re: How to split value where is comma ?

2016-09-07 Thread D';Arcy J.M. Cain
)) > This email is confidential and may be subject to privilege. If you > are not the intended recipient, please do not copy or disclose its > content but contact the sender immediately upon receipt. Do you realize how stupid it is to put this on a message sent all around the world? -- D&

Re: What you can do about legalese nonsense on email (was: How to split value where is comma ?)

2016-09-09 Thread D';Arcy J.M. Cain
;t the fact that they are attached to every email, even ones obviously meant for the public, give someone an argument that they don't really apply? -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list

Re: default argument value is mutable

2016-10-07 Thread D';Arcy J.M. Cain
On Fri, 07 Oct 2016 16:09:19 +0200 jmp wrote: > What about > > def test(): >if not hasattr(test, '_store'): test._store={'x':0} >test._store['x'] += 1 Why is everyone working so hard to avoid creating a class? -- D'Arcy J.M. Cain Syste

Re: The next major Python version will be Python 8

2016-03-31 Thread D';Arcy J.M. Cain
orate a new secret plan to ensure that Python > > users suffer again with a new major release breaking all their > > legacy code. > > "2016-03-31 23:40" > You're 20 minutes early :) And too obvious. -- D'Arcy J.M. Cain System Administrator, Vex.Net htt

Re: pylint woes

2016-05-08 Thread D';Arcy J.M. Cain
t; > as your name; the nature of your verbose output might give a clue as > to what name would work. How about "print"? if not verbose: def print(*args, **kws): pass -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list

Re: learning python. learning defining functions . need help

2016-07-22 Thread D';Arcy J.M. Cain
On Fri, 22 Jul 2016 08:21:17 -0700 justin walters wrote: > You could also replace that line with: > > if stock is None or type(stock) != dict: Use isinstance(). That handles classes that subclass dict as well. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.

Re: Why not allow empty code blocks?

2016-07-23 Thread D';Arcy J.M. Cain
you must see if you > have to put in a pass statement. And after adding a statement, you > may feel the urge to remove the redundant pass statement. If you allow empty blocks and you use it I hope that you would add a comment so that the reader knows that you meant it. for x in sequence:

Re: Why not allow empty code blocks?

2016-07-23 Thread D';Arcy J.M. Cain
On Sat, 23 Jul 2016 16:13:58 +0300 Marko Rauhamaa wrote: > "D'Arcy J.M. Cain" : > > It's ambiguous to the reader what was actually meant. Forcing a > > "pass" there shows the reader that the empty block was not a > > mistake. > > Just

Re: Why not allow empty code blocks?

2016-07-29 Thread D';Arcy J.M. Cain
e "pass #@#" which is easy to remove with a search and replace. In any case, the rule about premature optimization for programs can probably be applied to developers too. Is saving a "pass" once in a while really where you need to focus your debugging efforts? -- D'Ar

Re: Why not allow empty code blocks?

2016-07-29 Thread D';Arcy J.M. Cain
hat was an idiot. Oh wait - I wrote that. Damn! There must have been a reasonable excuse then. Naturally that part of my message was the only thing commented on. I suppose people stopped reading after that flub and missed my insightful comment on premature developer optimization. Getting more cof

Re: Why not allow empty code blocks?

2016-07-29 Thread D';Arcy J.M. Cain
there's a more than zero chance I might need to log it again one day. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list

Re: Why not allow empty code blocks?

2016-07-30 Thread D';Arcy J.M. Cain
n just isn't your language? By the way, the last time I replied to you it went to the list but your address bounced. Was that a glitch or are you using an invalid address in a mailing list? -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list

Re: Why not allow empty code blocks?

2016-07-30 Thread D';Arcy J.M. Cain
't care if you are using carrier pigeon. If you send an email address, make it a valid one. Maybe you should just change it to I_Am_a_Troll@nowhere. It's becoming increasingly obvious that you have absolutely no interest in Python and are just trying to get a rise out of people. *plon

Re: Procedures and functions [was Re: Why not allow empty code blocks?]

2016-07-30 Thread D';Arcy J.M. Cain
mpile-time syntax error) instead of a perplexing source of mystery > bugs. While neither is a syntax error, the latter is definitely a run-time error: >>> mylist.sort().reverse() Traceback (most recent call last): File "", line 1, in AttributeError: 'NoneType&#

Re: Why not allow empty code blocks?

2016-07-31 Thread D';Arcy J.M. Cain
On Mon, 01 Aug 2016 00:25:58 +1000 Gordon Levi wrote: > "D'Arcy J.M. Cain" wrote: > >I don't care if you are using carrier pigeon. If you send an email > >address, make it a valid one. > > I admire those who use a valid email address on Usenet but i

Re: Why not allow empty code blocks?

2016-07-31 Thread D';Arcy J.M. Cain
On Sun, 31 Jul 2016 11:53:47 -0400 "D'Arcy J.M. Cain" wrote: > On Mon, 01 Aug 2016 00:25:58 +1000 > On the other hand I have no throwaway accounts. Every address I use > is a primary one. I have all sorts of methods to block spam. None of > those methods involve

Using valid emails

2016-08-01 Thread D';Arcy J.M. Cain
Time to change the subject. On Tue, 02 Aug 2016 01:30:47 +1000 Gordon Levi wrote: > "D'Arcy J.M. Cain" wrote: > >: Host or domain name not found. Name service > >error for name=address.invalid type=: Host not found > > > >So I have to examine every

Re: Using valid emails

2016-08-01 Thread D';Arcy J.M. Cain
o send me email pretending to be from Vex.Net you get a "5xx Yah Right" error. > Unfortunately, a lot of domains don't have SPF records, or have very > convoluted ones (check out gmail.com's SPF for instance). I can only fix my little corner of the Internet. -- D'

Using valid emails

2016-08-01 Thread D';Arcy J.M. Cain
ing to the mailing list > side of things get our real email addresses copied out into Usenet > and I haven't noticed any change in spam levels. Ditto. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list

Re: Using valid emails

2016-08-01 Thread D';Arcy J.M. Cain
age was coming from. :0 Hir * ^List-Id:.*python-list.python.org * ^From:.*@gmail.com * ^Newsgroups:.* /dev/null -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list

Unicode failure

2015-12-04 Thread D';Arcy J.M. Cain
utf-8 Traceback (most recent call last): File "./g", line 5, in print(u"\N{TRADE MARK SIGN}") UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in position 0: ordinal not in range(128) What am I missing? TIA. -- D'Arc

Re: Unicode failure

2015-12-04 Thread D';Arcy J.M. Cain
On Fri, 4 Dec 2015 22:49:49 + Albert-Jan Roskam wrote: > I think you need to use a raw unicode string, ur > > >>> unicodedata.name(ur'\u2122') > 'TRADE MARK SIGN' That seems to work in 2.x but not 3.x. -- D'Arcy J.M. Cain Vybe Networks Inc.

Re: Unicode failure

2015-12-04 Thread D';Arcy J.M. Cain
On Fri, 4 Dec 2015 18:28:22 -0500 Terry Reedy wrote: > On 12/4/2015 1:07 PM, D'Arcy J.M. Cain wrote: > > I thought that going to Python 3.4 would solve my Unicode issues > > Within Python itself, that should be mostly true. As soon as you > send text to a display, t

Re: increment/decrement operators

2015-12-05 Thread D';Arcy J.M. Cain
On Sat, 5 Dec 2015 13:56:47 +0100 Robin Koch wrote: > x += y works. (Well, it should.) It does, even on objects other than numbers. >>> x = "abc" >>> y = "def" >>> x += y >>> x 'abcdef' > x++ doesn't. No but it'

Re: Unicode failure (Solved)

2015-12-05 Thread D';Arcy J.M. Cain
. Thanks to all. Following up on the various posts brought me to information that solved my problem. Basicall I added "export PYTHONIOENCODING=utf8" to my environment and "SetEnv PYTHONIOENCODING utf8" in my Apache config and now things are working as they should. Thanks

codecs.StreamRecoder not doing what I expected.

2015-12-12 Thread D';Arcy J.M. Cain
line 489, in read newdata = self.stream.read() File "/usr/pkg/lib/python3.4/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xa2 in position 6: ordinal not in range(128) -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list

Re: codecs.StreamRecoder not doing what I expected.

2015-12-12 Thread D';Arcy J.M. Cain
s not valid ASCII. However, my default encoding is utf-8. Other web pages on the same server display fine. I have the following in the Apache config by the way. SetEnv PYTHONIOENCODING utf8 So, my file is utf-8, I am reading it as utf-8, my Apache server output is set to utf-8. How is ASC

Re: codecs.StreamRecoder not doing what I expected.

2015-12-13 Thread D';Arcy J.M. Cain
On Sun, 13 Dec 2015 13:17:24 +0100 Laura Creighton wrote: > In a message of Sun, 13 Dec 2015 01:35:45 -0500, "D'Arcy J.M. Cain" > writes: > >When I try to print it to the web page it fails because the \xe9 > >character is not valid ASCII. However, my default enco

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2015-12-24 Thread D';Arcy J.M. Cain
ll themselves web designers. It reminds me of when one day people started claiming to be "building" computers and they didn't even own a soldering iron. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2015-12-24 Thread D';Arcy J.M. Cain
On Thu, 24 Dec 2015 17:30:08 + (UTC) Grant Edwards wrote: > And don't get me started on those people who use those "integrated > circuits" instead of transistors, relays, and tubes... Mmmm. Tubes. Still use them in my guitar amp. Transistors just aren't the s

Re: EOFError: marshal data too short -- causes?

2015-12-29 Thread D';Arcy J.M. Cain
eed to clutter up you file system. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem with 'print'

2016-01-09 Thread D';Arcy J.M. Cain
if anything needs to be tweaked. This is definitely the best solution IMO. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Stop writing Python 4 incompatible code

2016-01-14 Thread D';Arcy J.M. Cain
On Thu, 14 Jan 2016 14:43:51 +0100 Peter Otten <__pete...@web.de> wrote: > > Or we'll be hit by a big rock from space. > > Sounds like a plan. Which one? Number 9? -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da..

Re: Stop writing Python 4 incompatible code

2016-01-14 Thread D';Arcy J.M. Cain
st certainly. Hmm. Am I being too subtle or...? from OuterSpace import plan print(plan[9]) If that's still too subtle: https://en.wikipedia.org/wiki/Plan_9_from_Outer_Space -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list

Release of PyGreSQL version 4.2

2016-01-23 Thread D';Arcy J.M. Cain
;Arcy J.M. Cain PyGreSQL Development Group http://www.PyGreSQL.org IM:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list

Re: "IX" as shorthand for "Interface"

2011-10-09 Thread D';Arcy J.M. Cain
ss class Something(INTERFACE): ... It isn't in the name but the definition is clearly an "INTERFACE" (whatever that is) and you also have the option of gathering things in common to INTERFACEs in the superclass. -- D'Arcy J.M. Cain | Democracy is three wolve

Re: Any idea how i can format my output file with ********************Start file*********************** usinf Python 2.7

2013-02-09 Thread D';Arcy J.M. Cain
a Word document or simple text? -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. IM: da...@vex.net, VOIP: sip:da...@vex.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Shebang line on Windows?

2013-02-25 Thread D';Arcy J.M. Cain
he system that Linux is a clone of) out there. FreeBSD, NetBSD, Solaris, Mac OSX, etc. You can't expect all of them to bend over backwards for every Windows wart out there. I don't run Windows myself so I can't test it but doesn't Python on Windows work fine with

  1   2   3   4   5   >