Re: Import path for unit tests

2005-12-02 Thread Ben Finney
Duncan Booth <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > > What is the common idiom here? I can conceive of several possible > > ways to get around it, all of which seem hackish to some degree. > > I don't know if it is the common idiom, but I tend to write

Re: advice : how do you iterate with an acc ?

2005-12-03 Thread Ben Finney
>> acc.flush() Flushing items: ['strawberry'] >>> -- \ "[W]e are still the first generation of users, and for all that | `\ we may have invented the net, we still don't really get it." | _o__) -- Douglas Adams | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

enter and event

2005-12-04 Thread Ben Bush
When I read python Manuel, I got confused by the following code: def turnRed(self, event): event.widget["activeforeground"] = "red" self.button.bind("", self.turnRed) I can not understand it. -- http://mail.python.org/mailman/listinfo/python-list

oval

2005-12-04 Thread Ben Bush
I tested the following code and wanted to get the message of "oval2 got hit" if I click the red one. But I always got "oval1 got hit". from Tkinter import * root=Tk() canvas=Canvas(root,width=100,height=100) canvas.pack() a=canvas.create_oval(10,10,20,20,tags='oval1',fill='blue') b=canvas.create_ov

Re: oval

2005-12-04 Thread Ben Bush
On 12/4/05, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Ben Bush wrote: > > I tested the following code and wanted to get the message of "oval2 > > got hit" if I click the red one. But I always got "oval1 got hit". > > from Tkinter import * > &

Re: oval

2005-12-04 Thread Ben Bush
'd take it on you to consult the documentation as I asked you > to do, I'm pretty sure you find the proper attribute. > > > Regards, > > Diez > -- > http://mail.python.org/mailman/listinfo/python-list > thanks anyway. The python manual for event is very brief and it is hard for me to understand. -- Ben Bush -- http://mail.python.org/mailman/listinfo/python-list

Re: oval

2005-12-04 Thread Ben Bush
On 12/4/05, Peter Otten <[EMAIL PROTECTED]> wrote: > Ben Bush wrote: > > > On 12/4/05, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > >> Ben Bush wrote: > >> > I tested the following code and wanted to get the message of "oval2 > >> > go

change color

2005-12-04 Thread Ben Bush
I tested the following code and wanted to make oval 2 become red after I hit the enter key but though the code did not report error, it did not change. from Tkinter import * root=Tk() canvas=Canvas(root,width=100,height=100) canvas.pack() canvas.create_oval(10,10,20,20,tags='oval1',fill='blue') can

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-05 Thread Ben Sizer
term can see benefits to the approach when it is not just mentioned as a bizarre and arbitrary limitation of the language. -- Ben Sizer -- http://mail.python.org/mailman/listinfo/python-list

Iterating over test data in unit tests

2005-12-05 Thread Ben Finney
sEqual(score, instance.get_score()) self.iterate_test(test_func) That's somewhat clearer; the test function actually focuses on what it's testing. Those layers of indirection are annoying, but they allow the data sets to grow without writing more code to handle them. Testing a rules-based system involves lots of data sets, and each data set represents a separate test case; but the code for each of those test cases is mindlessly repetitive. Factoring them out seems like it needs a lot of indirection, and seems to make each test harder to read. Different *types* of tests would need multiple iterators, more complex test parameter dicts, or some more indirection. Those all sound ugly, but so does repetitively coding every test function whenever some new data needs to be tested. How should this be resolved? -- \ "I never forget a face, but in your case I'll be glad to make | `\ an exception." -- Groucho Marx | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Bitching about the documentation...

2005-12-05 Thread Ben Finney
"I put instant coffee in a microwave oven and almost went back | `\ in time." -- Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterating over test data in unit tests

2005-12-05 Thread Ben Finney
Scott David Daniels <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > > Summary: I'm looking for idioms in unit tests for factoring out > > repetitive iteration over test data > > How about something like: > > > class Test_Game(unittest.TestCase):

Re: Bitching about the documentation...

2005-12-05 Thread Ben Finney
my job the other day. They said my | `\personality was weird. ... That's okay, I have four more." -- | _o__)Bug-Eyed Earl, _Red Meat_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterating over test data in unit tests

2005-12-05 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> wrote: > Summary: I'm looking for idioms in unit tests for factoring out > repetitive iteration over test data. Thanks to those who've offered suggestions, especially those who suggested I look at generator functions. This leads to:: impor

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-06 Thread Ben Sizer
e done before a tool becomes useless. The context of your quote is that that things should be self-documenting and obvious.You simply can't do that with programming languages. All you can do is try to make it as consistent as possible, so that there are few surprises and as little documentatio

Re: Documentation suggestions

2005-12-06 Thread Ben Sizer
t up into separate manuals doesn't seem like it would help. Personally I'd be happy to see a lot of those modules removed from the distribution, but I expect few will agree with me. ;) -- Ben Sizer -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-06 Thread Ben Sizer
simply can't do that with programming languages. > > Maybe not completely. Trust me though, we can do better. Of course. However I would argue that indented scope is one way of doing so. Scope is instantly visible, and no longer a game of 'hunt the punctuation character, which i

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-07 Thread Ben Sizer
Antoon Pardon wrote: > Op 2005-12-06, Ben Sizer schreef <[EMAIL PROTECTED]>: > > Of course. However I would argue that indented scope is one way of > > doing so. Scope is instantly visible, and no longer a game of 'hunt the > > punctuation character, which is in a

Re: Documentation suggestions

2005-12-08 Thread Ben Sizer
does not appear on the surface to come from a library. As an aside, personally I rarely touch the sys module. I use re, random, threading, and even xml.dom.minidom more than sys. -- Ben Sizer -- http://mail.python.org/mailman/listinfo/python-list

Re: subset permutations

2005-12-08 Thread Ben Finney
tters. -- \ "I don't know anything about music. In my line you don't have | `\ to." -- Elvis Aaron Presley (1935-1977) | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Validating an email address

2005-12-09 Thread Ben Finney
, just deliver the message. -- \ "Those who can make you believe absurdities can make you commit | `\ atrocities." -- Voltaire | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Integrating Python into a C++ app

2005-01-03 Thread Ben Sizer
e any other options that would require a minimum of rewriting of code? Does anybody have any experience of such a project? -- Ben Sizer -- http://mail.python.org/mailman/listinfo/python-list

Re: PyChecker messages

2005-01-17 Thread Ben Sizer
But you could use a dict of return values, or even just assigning a different return value in each if clause. The end result is that you have a single well-defined exit point from the function, which is generally considered to be preferable. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bizarre error from help()

2005-08-09 Thread Ben Finney
| _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Memory leak in PyImport_ReloadModule - URGENT

2005-08-10 Thread ben . held
Having recently upgraded to Python 2.4, I am having a large memory leak with the following code built with VC++ 6.0: PyObject *pName, *pModule; Py_Initialize(); pName = PyString_FromString(argv[1]); pModule = PyImport_Import(pName);

PEP 328, absolute/relative import (was: Re: Bizarre error from help())

2005-08-10 Thread Ben Finney
Peter Hansen <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > > Roy Smith <[EMAIL PROTECTED]> wrote: > >>[current-directory module shadowing a system module] > > > > All hail the coming of PEP 328: > > http://www.python.org/peps/pep-0328.ht

Re: PEP 328, absolute/relative import

2005-08-10 Thread Ben Finney
Aahz <[EMAIL PROTECTED]> wrote: > Ben Finney <[EMAIL PROTECTED]> wrote: > >So, under PEP 328 rules, the original poster's current-directory > >module could only be imported (a) if the current directory was in > >sys.path, or (b) if the code specified a relati

Re: what's the exactly newsgroup url of python-list?

2005-08-10 Thread Ben Finney
\ it, it said 'Day 1: Still tired from the move. Day 2: Everybody | _o__) talks to me like I'm an idiot.'" -- Steven Wright | Ben Finney <http://www.benfinney.id.au/> -- http://mail.python.org/mailman/listinfo/python-list

Re: How do these Java concepts translate to Python?

2005-08-11 Thread Ben Finney
and each instance has its own 'bar' attribute created separately (in the __init__() method). -- \ "Unix is an operating system, OS/2 is half an operating system, | `\ Windows is a shell, and DOS is a boot partition virus." -- | _o__) Peter H. Coffin | Ben Finney <http://www.benfinney.id.au/> -- http://mail.python.org/mailman/listinfo/python-list

Re: Cheese shop (was Re: python2.4/site-packages)

2005-08-12 Thread Ben Finney
quot; -- Justice Roberts in 319 U.S. 624 (1943) | _o__) | Ben Finney <http://www.benfinney.id.au/> -- http://mail.python.org/mailman/listinfo/python-list

Re: Wheel-reinvention with Python

2005-08-15 Thread Ben Finney
ond-class citizen in the wx world. -- \ "I was the kid next door's imaginary friend." -- Emo Philips | `\ | _o__) | Ben Finney <http://www.benfinney.id.au/> -- http://mail.python.org/mailman/listinfo/python-list

Re: Really virtual properties

2005-08-18 Thread Ben Finney
://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/408713> -- \ "Any sufficiently advanced bug is indistinguishable from a | `\ feature." -- Rich Kulawiec | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: check whether directory is readable

2005-08-23 Thread Ben Finney
tacts, but I only need them when I read, so I got | `\ flip-ups." -- Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Doubt C and Python

2005-08-25 Thread Ben Sizer
in Pything is more > efficient. Please read the responses you've already gotten. Grant, Going by the Google Groups timestamps that I see, there's a good chance that none of the other responses were visible to the OP when the above followup was posted. -- Ben Sizer -- http://mail.python.org/mailman/listinfo/python-list

Re: py to exe: suggestions?

2005-08-28 Thread Ben Finney
- \ "If trees could scream, would we be so cavalier about cutting | `\ them down? We might, if they screamed all the time, for no good | _o__) reason." -- Jack Handey | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Interface with C

2005-09-14 Thread Ben Pearson
I have a program that is developed in C, that has a simple text interface. I would like to use the same program, but with a GUI. I would like to use Python to interface with it, so that Python will simply read and write the code that would be used from a normal user, but using a TK GUI. For exa

Re: Writing a parser the right way?

2005-09-21 Thread Ben Sizer
different processing depending on which sentence type you have, then yes, this class hierarchy may be useful to you. -- Ben Sizer -- http://mail.python.org/mailman/listinfo/python-list

Re: Test for structure

2005-02-16 Thread Ben Finney
alex wrote On 17/02/05 02:08: how can I check if a variable is a structure (i.e. a list)? For my special problem the variable is either a character string OR a list of character strings line ['word1', 'word2',...] You're trying to apply the LBYL principle. My bet is that your "special problem" c

Yahoo! Auto Response

2005-02-23 Thread ben-fuzzybear
Hi - This is the "vacation" program; I'm working for my owner, Ben. The account to which you have sent your mail is going to be discontinued at at the end of July (Yahoo's mail service has deteriorated well past "abysmal" into "nightmarishly bad",

Re: automatic nesting and indentation in emacs

2005-02-25 Thread Ben Barrowes
In emacs matlab-mode, highlight a region then use indent-region: C-M-\ runs the command indent-region which is an interactive compiled Lisp function in `indent'. (indent-region START END COLUMN) Indent each nonblank line in the region. With prefix no argument, indent each line using `indent-acco

Sound and music libraries?

2005-02-28 Thread Ben Sizer
X use in Python doesn't seem to be done for some reason. -- Ben Sizer. -- http://mail.python.org/mailman/listinfo/python-list

using python to parse md5sum list

2005-03-05 Thread Ben Rf
d across a lan of 4 windows computers. I've dabbled with different languages over the years and i think python is a good language for this but i have had a lot of trouble sifting through manual and tutorials finding out with commands i need and their syntax. Can someone please help me? Thanks

threading, qt, and the freakout

2004-11-29 Thread Ben Floyd
ead. If I comment out the threading code and uncomment the line below "#WORKS", the button text updates fine. But in the thread it breaks... I feel like I'm being stupid here, so ANY suggestions are much appreciated. Thanks all. Ben Floyd [EMAIL PROTECTED] #CUT

Re: .pth files?

2005-03-22 Thread Ben Beuchler
ine. Interesting. Where does it call home? site-packages? -Ben -- http://mail.python.org/mailman/listinfo/python-list

Re: Please help with this

2013-11-12 Thread Ben Finney
what I'm pondering?” “I think so, | `\ Brain, but shouldn't the bat boy be wearing a cape?” —_Pinky | _o__) and The Brain_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Most discussion on comp.lang.python is about developing with Python

2013-11-13 Thread Ben Finney
ith some good ideas.” —Jack Handey | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Converting hex data to image

2013-11-14 Thread Ben Finney
ge http://pillow.readthedocs.org/en/latest/reference/Image.html>. -- \ “It seems intuitively obvious to me, which means that it might | `\ be wrong.” —Chris Torek | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Converting hex data to image

2013-11-14 Thread Ben Finney
Ben Finney writes: > To turn a byte string into a file-like object for use with PIL, extract > the byte string as ‘image_data’, use the standard library ‘io.StringIO’ > class http://docs.python.org/3/library/io.html#io.StringIO>, then > create a new ‘PIL.Image’ object by reading f

Re: The Spirit of Python

2013-11-14 Thread Ben Finney
ntaining a URL to an amusing Twitter post about Python. -- \ “True greatness is measured by how much freedom you give to | `\ others, not by how much you can coerce others to do what you | _o__) want.” —Larry Wall | Ben

Re: understanding someone else's program

2013-11-15 Thread Ben Finney
el. Is there something particular about these functions that make them more difficult than good code? -- \ “Generally speaking, the errors in religion are dangerous; | `\those in philosophy only ridiculous.” —David Hume, _A Treatise | _o__)

Re: Any Good Tutorials?

2013-11-16 Thread Ben Finney
r the long run on distinguishing one | `\ bitstream from another in order to figure out which rules | _o__) apply.” —Eben Moglen, _Anarchism Triumphant_, 1999 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Program Translation - Nov. 14, 2013

2013-11-17 Thread Ben Bacarisse
of Basic will ensure that no one ever uses it again. True BASIC does not even have a Linux/Unix port. Finally, why are you timing Perl arithmetic? A translation into Perl does not seem to be an option. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: how to deal with deprecating API functionality in python module?

2013-11-20 Thread Ben Finney
ure. -- \ “The trouble with the world is that the stupid are cocksure and | `\ the intelligent are full of doubt.” —Bertrand Russell | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: how to deal with deprecating API functionality in python module?

2013-11-21 Thread Ben Finney
, but how does it work in | `\ *theory*?” —anonymous | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Web framework

2013-11-22 Thread Ben Finney
rk? -- \“Program testing can be a very effective way to show the | `\presence of bugs, but is hopelessly inadequate for showing | _o__) their absence.” —Edsger W. Dijkstra | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: SetupTools

2013-11-25 Thread Ben Finney
and/or convince your system administrators to remove it when sending to public forums. -- \“… Nature … is seen to do all things Herself and through | `\ herself of own accord, rid of all gods.” —Titus Lucretius | _o__) Carus, c. 40

Re: python for everyday tasks

2013-11-25 Thread Ben Finney
“Nature hath given men one tongue but two ears, that we may | `\ hear from others twice as much as we speak.” —Epictetus, | _o__) _Fragments_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: How to determine whether client and server are on the same host

2013-11-25 Thread Ben Finney
ey should get. If they want to take advantage of a local connection, they can use a Unix domain socket. -- \ “I wrote a song, but I can't read music so I don't know what it | `\is. Every once in a while I'll be listening to the radio and I | _o__) say, ‘I think I

Re: Static Website Generator

2013-11-27 Thread Ben Finney
rums http://getnikola.com/contact.html>. -- \ “I do not believe in forgiveness as it is preached by the | `\church. We do not need the forgiveness of God, but of each | _o__)other and of ourselves.” —Robert G. Ingersoll | Ben Finney -- https://mai

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-27 Thread Ben Finney
oughts? I'd try very hard to find an equivalent URL that isn't so long :-) but URLs in comments are a good example of a PEP 8 exception: if the line is over 80 characters because it contains a long URL in a comment, that's fine, as I'm not expecting the human reader to be scanning it carefully like other text in the code. -- \“I fly Air Bizarre. You buy a combination one-way round-trip | `\ticket. Leave any Monday, and they bring you back the previous | _o__) Friday. That way you still have the weekend.” —Steven Wright | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-27 Thread Ben Finney
Not least because you're very likely going to use the value of ‘file_path’ yet again in the body of that ‘if’ block. -- \ “Two paradoxes are better than one; they may even suggest a | `\ solution.” —Edward Teller | _o__)

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-27 Thread Ben Finney
ers. Thank you. -- \ “The most common way people give up their power is by thinking | `\ they don't have any.” —Alice Walker | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-27 Thread Ben Finney
Steven D'Aprano writes: > On Thu, 28 Nov 2013 13:47:22 +1100, Ben Finney wrote: > > [A triple-quoted string is] not syntactically a comment, and I don't > > think pretending triple-quoted strings are comments is good > > practice. If nothing else, you'l

Re: Access database - GUI - Python - I need architectural advice

2013-11-27 Thread Ben Finney
\ so, Brain, but three men in a tub? Ooh, that's unsanitary!” | _o__) —_Pinky and The Brain_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: using ffmpeg command line with python's subprocess module

2013-12-02 Thread Ben Finney
provided with a filename dynamically created by Bash, referring to a temporary file that contains the output of the subshell. -- \ “Welchen Teil von ‘Gestalt’ verstehen Sie nicht? [What part of | `\‘gestalt’ don't you understand?]” —Karsten M. Self | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Unicode handling wins again -- mostly

2013-12-02 Thread Ben Finney
27;s article. -- \ “Pray, v. To ask that the laws of the universe be annulled in | `\ behalf of a single petitioner confessedly unworthy.” —Ambrose | _o__) Bierce, _The Devil's Dictionary_, 1906 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Code of Conduct, Trolls, and Thankless Jobs

2013-12-02 Thread Ben Finney
alf of you half as well as I should like, and I | `\ like less than half of you half as well as you deserve.” —Bilbo | _o__) Baggins | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Official discussion forum for a project (was: Packaging a proprietary Python library for multiple OSs)

2013-12-05 Thread Ben Finney
re unpopular because they require | `\ hard work and discipline to achieve and education to be | _o__)appreciated.” —Edsger W. Dijkstra | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Movie (MPAA) ratings and Python?

2013-12-09 Thread Ben Finney
“A child of five could understand this. Fetch me a child of | `\ five.” —Groucho Marx | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Ben Finney
Dan Stromberg writes: > On Mon, Dec 9, 2013 at 10:40 PM, Ben Finney wrote: > > What information would you want access to? Why would a library > > (rather than, say, a short set of strings) be needed? > > > Movie ratings. EG G, PG, PG-13, etc. That tells me only tha

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Ben Finney
at the brain was the most wonderful organ in | `\ my body. Then I realized who was telling me this.” —Emo Philips | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Ben Finney
a furious | `\ argument over what I considered to be an odd number.” —Steven | _o__) Wright | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: grab dict keys/values without iterating ?!

2013-12-10 Thread Ben Finney
;ll be interested to know the rest of that paragraph, to know whether the above list comprehension meets your constraints. -- \ “I was in the first submarine. Instead of a periscope, they had | `\ a kaleidoscope. ‘We're surrounded.’” —Steven Wright | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there any advantage to using a main() in python scripts?

2013-12-11 Thread Ben Finney
ives the command line as a parameter, and returns the exit code. -- \ “Faith, n. Belief without evidence in what is told by one who | `\ speaks without knowledge, of things without parallel.” —Ambrose | _o__) Bierce, _The Devil's Dictionary_, 1906 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Disable HTML in forum messages (was: Movie (MPAA) ratings and Python?)

2013-12-11 Thread Ben Finney
ly from several operating systems (e.g. Debian) or install it yourself. It works with numerous existing mail clients, and brings the significant advantage of organising one's email by search, not by exclusive folders. -- \“Intellectual property is to the 21st century what the slave |

Re: Optimizing list processing

2013-12-11 Thread Ben Finney
? Is that useful for determining which branch to take? -- \ “The fact that a believer is happier than a skeptic is no more | `\ to the point than the fact that a drunken man is happier than a | _o__) sober one.” —George Bernard Shaw | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

The increasing disempowerment of the computer user (was: Experiences/guidance on teaching Python as a first programming language)

2013-12-11 Thread Ben Finney
u tell the users of today about that, and they don't believe you. -- \ “If nature has made any one thing less susceptible than all | `\others of exclusive property, it is the action of the thinking | _o__) power called an idea” —Thomas Jefferson | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: The increasing disempowerment of the computer user

2013-12-11 Thread Ben Finney
Ben Finney writes: > Larry Martell writes: > > > On Wed, Dec 11, 2013 at 8:42 PM, Roy Smith wrote: > > > rusi wrote: > > > > > >> Many assumptions need to be verified/truthified/dovetailed > > >> starting from switching on the machine

Re: Code suggestion - List comprehension

2013-12-12 Thread Ben Finney
ur way to a time when faith, without evidence, | `\disgraces anyone who would claim it.” —Sam Harris, _The End of | _o__) Faith_, 2004 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Type of an object: ‘obj.__class__’ versus ‘type(obj)’

2013-12-15 Thread Ben Finney
ering what I'm pondering?” “I think so, | `\Brain, but Zero Mostel times anything will still give you Zero | _o__) Mostel.” —_Pinky and The Brain_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Type of an object: ‘obj.__class__’ versus ‘type(obj)’

2013-12-15 Thread Ben Finney
“For fast acting relief, try slowing down.” —Jane Wagner, via | `\ Lily Tomlin | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Wrapping around a list in Python.

2013-12-15 Thread Ben Finney
the supply has always been in excess of | `\ the demand.” —Josh Billings | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Type of an object: ‘obj.__class__’ versus ‘type(obj)’

2013-12-15 Thread Ben Finney
Chris Angelico writes: > On Mon, Dec 16, 2013 at 3:50 PM, Ben Finney > wrote: > > Should we expect (ignoring pathological cases) the assertion > > ‘type(obj) is obj.__class__’ to hold true? If not, under what > > circumstances would it be sensible for those to diff

Re: Deamonify my python script on Android

2013-12-23 Thread Ben Finney
my life there.” —Charles F. Kettering | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: looking for a quote on age and technology

2014-01-01 Thread Ben Finney
g down.” —Jane Wagner, via | `\ Lily Tomlin | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: should error class be defined in the class it logically belongs?

2014-01-05 Thread Ben Finney
for peace. Hitler was for | `\ peace. Everybody is for peace. The question is: what kind of | _o__)peace?” —Noam Chomsky, 1984-05-14 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

[OT] Migrating from non-free programs to LibreOffice (was: "More About Unicode in Python 2 and 3")

2014-01-05 Thread Ben Finney
\ “It is far better to grasp the universe as it really is than to | `\persist in delusion, however satisfying and reassuring.” —Carl | _o__) Sagan | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] gg_scrapper -- scrapping of the Google Groups

2014-01-05 Thread Ben Finney
o Google Groups being scrapped! -- \ “And if I laugh at any mortal thing, / 'Tis that I may not | `\ weep.” —“Lord” George Gordon Noel Byron, _Don Juan_ | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Ben Finney
roprietary software packages, is | `\ being able to choose your master. Freedom means not having a | _o__) master.” —Richard M. Stallman, 2007-05-16 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] Migrating from non-free programs to LibreOffice

2014-01-07 Thread Ben Finney
Michael Torrie writes: > On 01/05/2014 04:30 PM, Ben Finney wrote: > > In short: Everything that was good about OpenOffice is now called > > LibreOffice, which had to change its name only because the owners of > > that name refused to let it go. > > Your information i

Re: the Gravity of Python 2

2014-01-08 Thread Ben Finney
grammers need to learn this messy arbitrary crap, at least to the point of knowing unambiguously what we ask the computer to do when it interacts with the messy real world. -- \ “I prayed for twenty years but received no answer until I | `\ prayed with my legs.” —Frederick Do

Time zones and why they change so damned often (was: the Gravity of Python 2)

2014-01-08 Thread Ben Finney
Chris Angelico writes: > On Thu, Jan 9, 2014 at 2:34 PM, Ben Finney wrote: > > With time zones, as with text encodings, there is a single > > technically elegant solution (for text: Unicode; for time zones: > > twelve simple, static zones that never change) > > Twe

Re: Constructive Criticism

2014-01-08 Thread Ben Finney
e responses giving feedback. -- \ “My girlfriend has a queen sized bed; I have a court jester | `\ sized bed. It's red and green and has bells on it, and the ends | _o__) curl up.” —Steven Wright | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: the Gravity of Python 2

2014-01-08 Thread Ben Finney
for you? If not, can you explain more precisely what you're asking? -- \ “A child of five could understand this. Fetch me a child of | `\ five.” —Groucho Marx | _o__) |

Re: the Gravity of Python 2

2014-01-09 Thread Ben Finney
w’ function explicitly returns a naive datetime object, not an aware datetime object. -- \ “We must respect the other fellow's religion, but only in the | `\ sense and to the extent that we respect his theory that his | _o__) wife is beautiful and his children smart.” —Henry

Re: the Gravity of Python 2

2014-01-09 Thread Ben Finney
Kushal Kumaran writes: > Ben Finney writes: > > > Kushal Kumaran writes: > > > >> Roy Smith writes: > >> > How, in Python, do you get an aware UTC datetime object? > >> > >> classmethod datetime.utcnow() > >> > >>

Re: parametized unittest

2014-01-11 Thread Ben Finney
—Edsger W. Dijkstra | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: python-list@python.org

2014-01-15 Thread Ben Finney
stdin and stdout are ASCII, largely because it hasn't been told otherwise. -- \“The greatest tragedy in mankind's entire history may be the | `\ hijacking of morality by religion.” —Arthur C. Clarke, 1991 | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: data validation when creating an object

2014-01-15 Thread Ben Finney
-- \ “Nature hath given men one tongue but two ears, that we may | `\ hear from others twice as much as we speak.” —Epictetus, | _o__) _Fragments_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Guessing the encoding from a BOM

2014-01-15 Thread Ben Finney
hich exception?) +1. I'd like a custom exception class, sub-classed from ValueError. -- \ “I love to go down to the schoolyard and watch all the little | `\ children jump up and down and run around yelling and screaming. | _o__) They don't know I'm only using blanks.” —Emo Philips | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

<    9   10   11   12   13   14   15   16   17   18   >