good question
--
http://mail.python.org/mailman/listinfo/python-list
Thrinaxodon writes:
> [… strange fictitious dialogue …]
> THRINAXODON IS NOW ON TWITTER.
Thrinaxodon should not bother to post such hostility here again.
--
\ “I don't want to live peacefully with difficult realities, and |
`\ I see no virtue in savoring excuses for avoiding a sear
Thanks MRAB your alternative regex implementation worked flawlessly.
It works now.
--
http://mail.python.org/mailman/listinfo/python-list
=
>MESSAGE FROM COMPUTER GEEK.
=
>
THRINAXODON HAS RECENTLY RECEIVED THIS MESSAGE FROM THE PYTHON FOUNDER:
Oh my God! It's hard to program with, it`s troubling for so many people!
I call for the cancellation of the Python programming language.
>
THRINAXODON: Wow!
[IMG]http://i41.tinypic.com/35002rr.png[/IMG]
Heres a screenshot http://i41.tinypic.com/35002rr.png
--
http://mail.python.org/mailman/listinfo/python-list
Thanks MRAB, your suggestion worked. But then it brought an error
'ascii' codec can't encode characters in position 0-1: ordinal not in
range(128)
I corrected this by encoding it to 'utf-8'. The code looks like this now.
pattern = ur'(?u)\w+'
def __init__(self, *args):
I get it now! Thank you so much for your help, I really appreciate it. :)
--
http://mail.python.org/mailman/listinfo/python-list
On 06/26/2013 04:54 PM, Steven D'Aprano wrote:
On Wed, 26 Jun 2013 13:14:44 -0700, Ethan Furman wrote:
On 06/23/2013 11:50 AM, Steven D'Aprano wrote:
What else would you call a function that does lookups on the current
object's superclasses?
Well, I would call it super(). Trouble is, that
On Wed, Jun 26, 2013 at 5:54 PM, Steven D'Aprano
wrote:
> No. But "the current object" is not Base1, but an instance of Derived,
> and Base2 *is* an ancestor of Derived. Perhaps if I had said "self"
> instead of current object, you wouldn't have made this error. If so, I
> apologise for confusing
On Wed, 26 Jun 2013 10:09:13 -0700, rusi wrote:
> On Wednesday, June 26, 2013 8:54:56 PM UTC+5:30, Joshua Landau wrote:
>> On 25 June 2013 22:48, Gene Heskett wrote:
>> > On Tuesday 25 June 2013 17:47:22 Joshua Landau did opine:
>>
>> I did not.
>
> I guess Joshua is saying that saying ≠ opinin
On Wed, 26 Jun 2013 13:14:44 -0700, Ethan Furman wrote:
> On 06/23/2013 11:50 AM, Steven D'Aprano wrote:
>> What else would you call a function that does lookups on the current
>> object's superclasses?
>
> Well, I would call it super(). Trouble is, that is not all that super()
> does. Going b
On 26 Jun 2013 14:14, "Tim" wrote:
>
> I am extending a parser and need to create many classes that are all
subclassed from the same object (defined in an external library). When my
module is loaded I need all the classes to be created with a particular
name but the behavior is all the same. Curr
On 2013-06-26 16:17, Foo Stack wrote:
> Given string input such as:
> foo=5 AND a=6 AND date=now OR date='2013/6' AND bar='hello'
>
> I am going to implement:
>
> - boolean understanding (which operator takes precendence)
> - spliting off of attributes into my function which computes their
>
On 26 June 2013 16:40, Peter Otten <__pete...@web.de> wrote:
> Joshua Landau wrote:
>
>> I would say if a dict isn't good, there are still some cases where you
>> might not want to use globals.
>>
>> I _might_ do:
>
>> # Make a module
>> module_for_little_classes = ModuleType("module_for_little_cla
Given string input such as:
foo=5 AND a=6 AND date=now OR date='2013/6' AND bar='hello'
I am going to implement:
- boolean understanding (which operator takes precendence)
- spliting off of attributes into my function which computes their table in the
SQL database
- piece everything together
On 26 June 2013 23:21, PyNoob wrote:
> Sorry about that... And thanks for your help, but I don't quite understand.
That's fine, but...
> Would that make it off your example print("{:g}".format(1.0))?
I don't understand this sentence.
But, hey, I forgot to check what level you were working at --
Sorry about that... And thanks for your help, but I don't quite understand.
Would that make it off your example print("{:g}".format(1.0))?
--
http://mail.python.org/mailman/listinfo/python-list
On 26 June 2013 23:02, wrote:
> Hello, i'm making a calculator and I want to be able to use decimals but I
> don't like it when it comes out as ex.12.0 when it should be 12. I tried
> using .rstrip("0".rstrip(".") but that never seemed to work. If anyone has a
> solution please let me know, al
On 26 June 2013 17:46, Steven D'Aprano
wrote:
> On Wed, 26 Jun 2013 16:24:56 +0100, Joshua Landau wrote:
>
>> On 25 June 2013 22:48, Gene Heskett wrote:
>>> On Tuesday 25 June 2013 17:47:22 Joshua Landau did opine:
>>
>> I did not.
>
> Unless there are two people called "Joshua Landau" with email
Hello, i'm making a calculator and I want to be able to use decimals but I
don't like it when it comes out as ex.12.0 when it should be 12. I tried using
.rstrip("0".rstrip(".") but that never seemed to work. If anyone has a solution
please let me know, all help is greatly appreciated.
Code:
d
On 06/23/2013 11:50 AM, Steven D'Aprano wrote:
On Sun, 23 Jun 2013 12:04:35 -0600, Ian Kelly wrote:
On Sun, Jun 23, 2013 at 11:36 AM, Steven D'Aprano
wrote:
On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote:
Incidentally, although super() is useful, it's not perfect, and this
is one of my
On 26.06.2013 16:28, William Ray Wing wrote:
On Jun 26, 2013, at 7:49 AM, Fábio Santos mailto:fabiosantos...@gmail.com>> wrote:
On 26 Jun 2013 11:45, mailto:jim...@aol.com>> wrote:
>
> On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote:
> > In my experience the sorts of people who preach
On 06/23/2013 12:05 PM, Ian Kelly wrote:
On Sun, Jun 23, 2013 at 12:46 PM, Steven D'Aprano
wrote:
All is not lost, there are ways to make your classes cooperative. The
trick is to have your classes' __init__ methods ignore keyword arguments
they don't know what to do with. object used to do the
On 26/06/2013 20:18, akshay.k...@gmail.com wrote:
I am using the following Highlighter class for Spell Checking to work on my
QTextEdit.
class Highlighter(QSyntaxHighlighter):
In Python 2.7, the re module has a somewhat limited idea of what a
"word" character is. It recognises 'DEVANAGARI LET
On 6/26/2013 3:18 PM, akshay.k...@gmail.com wrote:
I am using the following Highlighter class for Spell Checking to work on my
QTextEdit.
class Highlighter(QSyntaxHighlighter):
pattern = ur'\w+'
def __init__(self, *args):
QSyntaxHighlighter.__init__(self, *args)
self
Dennis Lee Bieber wrote:
> On Mon, 24 Jun 2013 19:01:11 -0700 (PDT), rusi
> declaimed the following:
>
>>On Tuesday, June 25, 2013 3:08:57 AM UTC+5:30, Chris Angelico wrote:
>>> On Tue, Jun 25, 2013 at 5:52 AM, <> wrote:
>>>
>>> > (NOTE: Many people are being taught to avoid 'break' and 'cont
Op 25-06-13 17:56, ru...@yahoo.com schreef:
On 06/24/2013 07:37 AM, Antoon Pardon wrote:
Op 23-06-13 16:29, ru...@yahoo.com schreef:
On 06/21/2013 01:32 PM, Antoon Pardon wrote:
Op 19-06-13 23:13, ru...@yahoo.com schreef:
[...]
I put forward what I thought was a rational way of thinking
abou
I am using the following Highlighter class for Spell Checking to work on my
QTextEdit.
class Highlighter(QSyntaxHighlighter):
pattern = ur'\w+'
def __init__(self, *args):
QSyntaxHighlighter.__init__(self, *args)
self.dict = None
def setDict(self, dict):
self.d
On Wednesday, June 26, 2013 8:54:56 PM UTC+5:30, Joshua Landau wrote:
> On 25 June 2013 22:48, Gene Heskett wrote:
> > On Tuesday 25 June 2013 17:47:22 Joshua Landau did opine:
>
> I did not.
I guess Joshua is saying that saying ≠ opining
[Or is he opining?]
--
http://mail.python.org/mailman/l
On Wed, 26 Jun 2013 16:24:56 +0100, Joshua Landau wrote:
> On 25 June 2013 22:48, Gene Heskett wrote:
>> On Tuesday 25 June 2013 17:47:22 Joshua Landau did opine:
>
> I did not.
Unless there are two people called "Joshua Landau" with email address
, I'm afraid that you did.
Here's the email t
On Thu, Jun 27, 2013 at 1:24 AM, Joshua Landau
wrote:
> On 25 June 2013 22:48, Gene Heskett wrote:
>> On Tuesday 25 June 2013 17:47:22 Joshua Landau did opine:
>
> I did not.
Beg pardon? It looked like an accurate citation to me - you quoted the
OP's second post, then added the line beginning "S
Joshua Landau wrote:
> I would say if a dict isn't good, there are still some cases where you
> might not want to use globals.
>
> I _might_ do:
> # Make a module
> module_for_little_classes = ModuleType("module_for_little_classes",
> "All the things")
> module_for_little_classes.__dict__.update
On Thu, Jun 27, 2013 at 1:16 AM, Rotwang wrote:
> On 25/06/2013 23:57, Chris Angelico wrote:
>>
>> On Wed, Jun 26, 2013 at 8:38 AM, Mark Janssen
>> wrote:
>>>
>>> Combining integers with sets I can make
>>> a Rational class and have infinite-precision arithmetic, for example.
>>
>>
>> Combining t
On 25 June 2013 22:48, Gene Heskett wrote:
> On Tuesday 25 June 2013 17:47:22 Joshua Landau did opine:
I did not.
--
http://mail.python.org/mailman/listinfo/python-list
On 25/06/2013 23:57, Chris Angelico wrote:
On Wed, Jun 26, 2013 at 8:38 AM, Mark Janssen wrote:
Combining integers with sets I can make
a Rational class and have infinite-precision arithmetic, for example.
Combining two integers lets you make a Rational. Python integers are
already infinite-p
On 26 June 2013 15:46, Peter Otten <__pete...@web.de> wrote:
> The clean way to
> cope with the situation is to use a dict:
>
> classnames = ["Vspace", ...]
> classes = {name: type(name, ...) for name in classnames}
>
> Then you can access the Vspace class with
>
> classes["Vspace"]
>
> If that is
On Wednesday, June 26, 2013 10:46:55 AM UTC-4, Peter Otten wrote:
> Tim wrote:
> > I am not completely understanding the type function I guess. Here is an
> > example from the interpreter:
>
> No, you are not understanding how Python namespaces work ;)
> To get a Vspace in the global namespace yo
Tim wrote:
> I am not completely understanding the type function I guess. Here is an
> example from the interpreter:
>
> In [1]: class MyClass(object):
>...: pass
>...:
> In [2]: type('Vspace', (MyClass,), {})
> Out[2]: __main__.Vspace
> In [3]: x = Vspace()
>
---
On Jun 26, 2013, at 7:49 AM, Fábio Santos wrote:
> On 26 Jun 2013 11:45, wrote:
> >
> > On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote:
> > > In my experience the sorts of people who preach "one exit point" are
> > > also all about defining preconditions and postconditions and proving
>
Le mardi 25 juin 2013 06:18:44 UTC+2, jyou...@kc.rr.com a écrit :
> Would like to get your opinion on this. Currently to get the metadata out of
> a pdf file, I loop through the guts of the file. I know it's not the
> greatest idea to do this, but I'm trying to avoid extra modules, etc.
>
>
>
On Wednesday, June 26, 2013 9:39:12 AM UTC-4, Peter Otten wrote:
> Tim wrote:
> > I am extending a parser and need to create many classes that are all
> > subclassed from the same object (defined in an external library). When my
> > module is loaded I need all the classes to be created with a pa
On Tuesday, June 25, 2013 10:09:53 PM UTC+5:30, jim...@aol.com wrote:
> I just checked and MISRA-C 2012 now allows gotos in specific, limited
> circumstances. I think it was the MISRA-C 1998 standard that caused all this
> trouble. So if MISRA now allows goto, why not Python :)
Not sure w
Tim wrote:
> I am extending a parser and need to create many classes that are all
> subclassed from the same object (defined in an external library). When my
> module is loaded I need all the classes to be created with a particular
> name but the behavior is all the same. Currently I have a bunch
On Wednesday, June 26, 2013 6:03:39 PM UTC+5:30, Steven D'Aprano wrote:
> On Tue, 25 Jun 2013 12:39:53 -0400, jimjhb wrote:
>
>
>
> > I just checked and MISRA-C 2012 now allows gotos in specific, limited
>
> > circumstances. I think it was the MISRA-C 1998 standard that caused all
>
> > this
I am extending a parser and need to create many classes that are all subclassed
from the same object (defined in an external library). When my module is
loaded I need all the classes to be created with a particular name but the
behavior is all the same. Currently I have a bunch of lines like th
On 2013-06-25, rusi wrote:
> On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote:
>> In my experience the sorts of people who preach "one exit point" are
>> also all about defining preconditions and postconditions and proving
>> that the postconditions follow from the preconditions. I think
On Tue, 25 Jun 2013 12:39:53 -0400, jimjhb wrote:
> I just checked and MISRA-C 2012 now allows gotos in specific, limited
> circumstances. I think it was the MISRA-C 1998 standard that caused all
> this trouble. So if MISRA now allows goto, why not Python :)
[humour]
You can! Just use the
On Wednesday, 26 June 2013 12:57:32 UTC+10, jasonve...@gmail.com wrote:
> Hi,
>
>
>
> I get an "unresolved externals" error message when building pywin32 for pypy,
> as listed below. Both are the latest versions,
> amauryfa-pywin32-pypy-2a1da51e8152 and pypy-2.0.2. As per build
> requireme
On 26 Jun 2013 11:45, wrote:
>
> On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote:
> > In my experience the sorts of people who preach "one exit point" are
> > also all about defining preconditions and postconditions and proving
> > that the postconditions follow from the preconditions. I
On Tue, 25 Jun 2013 14:39:30 -0600, Ian Kelly wrote:
> On Tue, Jun 25, 2013 at 2:31 PM, Joshua Landau
> wrote:
>> On 25 June 2013 21:22, Bryan Britten wrote:
>>> Ah, I always forget to mention my OS on these forums. I'm running
>>> Windows.
>>
>> Supposedly, Windows has "more"
>> [http://superus
In article ,
xDog Walker wrote:
> On Tuesday 2013 June 25 19:16, Dave Angel wrote:
> > On 06/25/2013 03:38 PM, Stig Sandbeck Mathisen wrote:
> > > jonathan.slend...@gmail.com writes:
> > >> Any suggestions for a good name, for a framework that does automatic
> > >> server deployments?
>
> Yet A
Op 26-06-13 00:27, Mark Janssen schreef:
>> The main problem is getting to the top/end of the call chain. Classic
>> example is with __init__, but the same problem can also happen with
>> other calls. Just a crazy theory, but would it be possible to
>> construct a black-holing object that, for any
On Tuesday 2013 June 25 19:16, Dave Angel wrote:
> On 06/25/2013 03:38 PM, Stig Sandbeck Mathisen wrote:
> > jonathan.slend...@gmail.com writes:
> >> Any suggestions for a good name, for a framework that does automatic
> >> server deployments?
Yet Another Deployment Framework?
--
Yonder nor sorg
On Tuesday 25 June 2013 17:47:22 Joshua Landau did opine:
> On 25 June 2013 21:22, Bryan Britten wrote:
> > Ah, I always forget to mention my OS on these forums. I'm running
> > Windows.
>
> Supposedly, Windows has "more"
> [http://superuser.com/questions/426226/less-or-more-in-windows],
Yes, b
f.seek(0) really does the trick.
Danke sehr,
Phu
On Tue, Jun 25, 2013 at 6:47 AM, Peter Otten <__pete...@web.de> wrote:
> Phu Sam wrote:
>
> > I have a method that opens a file, lock it, pickle.load the file into a
> > dictionary.
> > I then modify the status of a record, then pickle.dump the
On Mon, Jun 24, 2013 at 7:37 AM, Antoon Pardon
wrote:
> What do you mean with not a participant in the past? As far
> as I can see his first appearance was in dec 2011. That is
> over a year ago. It also seems that he always find people
> willing to engage with him. Is how the group treats him
> n
On Wed, Jun 26, 2013 at 9:19 AM, Mark Janssen wrote:
> Did you ever hear of the Glass Bead Game?
Yeah, it's Magic: The Gathering and its counters.
http://www.wizards.com/magic/magazine/Article.aspx?x=mtgcom/daily/mr195
:)
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote:
> In my experience the sorts of people who preach "one exit point" are
> also all about defining preconditions and postconditions and proving
> that the postconditions follow from the preconditions. I think that
> the two are linked, becau
This is my first time using pyinstaller. My goal is to build an .app in Mac.
The app is basically a GUI written in PySide, and I have about 7 different
Python scripts + 1 .png file. The main file calls 4 of the files, and the 4
files will call the rest of the 2 files repeatedly. The .png file is
On Wednesday, 26 June 2013 01:40:22 UTC+1, Dennis Lee Bieber wrote:
> (hmmm, does any
> language have a continue that can go to the next iteration of an outer
> loop?)
Perl allows next with a label:
> perldoc -f next
next LABEL
nextThe "next" command is like the "continue" statement i
Am 12.06.2013 03:46 schrieb Rick Johnson:
On Tuesday, June 11, 2013 8:25:30 PM UTC-5, nagia@gmail.com wrote:
is there a shorter and more clear way to write this?
i didnt understood what Rick trie to told me.
My example included verbatim copies of interactive sessions within the Python
co
On Tue, Jun 25, 2013 at 7:07 PM, Mark Janssen wrote:
>> When you inherit a "set" to make a Rational, you're making the
>> statement (to the interpreter, if nothing else) that a Rational is-a
>> set.
>
> No you don't *inherit* a set to make a Rational, although you gain a
> set to make it.
Okay, t
On Tue, 25 Jun 2013 16:19:08 -0700, Mark Janssen wrote:
> Well you've been spoiled by all the work that came before you. The
> issue now is not to go "back to the machine" so much as to tear down and
> build up again from raw materials, objects of more and more complexity
> where very complex "me
This email was blocked due to unallowed file attachment.
From: python-list@python.org
Recipient: jbee...@lakeport.k12.ca.us
Subject: Returned mail: Data format error
Date: Wed, 26 Jun 2013 16:30:55 +0800
powered by
mxHero
--
http://mail.pytho
On Tue, 25 Jun 2013 17:05:50 -0700, willlewis965 wrote:
> thanks man you answered my questions very clear, btw do you know of a
> place where I can learn python I know some tutorials but are 2.
> something and I'm using 3.3 and I've been told they are different.
Try here:
http://mail.python.org/
Michael Torrie於 2013年6月20日星期四UTC+8下午2時01分11秒寫道:
>
> But since the LISP never really got a form beyond S-expressions,
>
> leaving us with lots of parenthesis everywhere, Python wins much as the
>
> Hitchhiker's Guide to the Galaxy wins.
Yep, a list is mutable even it's empty.
But constant integ
On Wed, Jun 26, 2013 at 10:47 AM, Dennis Lee Bieber
wrote:
> On Tue, 25 Jun 2013 17:20:43 +1000, Neil Hodgson
> declaimed the following:
>
>>jim...@aol.com:
>>
>>> Syntax:
>>> fwhile X in ListY and conditionZ:
>>
>>There is precedent in Algol 68:
>>
>>for i from 0 to n while safe(i) do .. od
On Wed, Jun 26, 2013 at 11:07 AM, Mark Janssen
wrote:
Combining two integers lets you make a Rational.
>>>
>>> Ah, but what is going to group them together? You see you've already
>>> gotten seduced. Python already uses a set to group them together --
>>> it's called a Dict and it's in ever
68 matches
Mail list logo