harrelson wrote:
I have a large amount of data in a postgresql database with the
encoding of SQL_ASCII. Most recent data is UTF-8 but data from
several years ago could be of some unknown other data type. Being
honest with myself, I am not even sure that the most recent data is
always UTF-8-- da
On Oct 3, 1:51 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> greg a écrit :
>
> > Bruno Desthuilliers wrote:
>
> >> OTHO, 'one class per file' is a standard idiom in Java and IIRC in C++
> >> (which both have namespaces one way or another)
>
> > In Java you don't get a choice, because the co
On Oct 3, 3:47 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> greg wrote:
> > jhermann wrote:
>
> >> I didn't see this mentioned in the thread yet: the double-lambda is
> >> unnecessary (and a hack).
>
> > Well, the alternative -- abusing default argument values --
> > is seen by many to be a hack as
On Oct 3, 1:46 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> dmitrey a écrit :
>
> > hi all,
> > I have a code
> > z = MyClass(some_args)
> > can I somehow get info in MyClass __init__ function that user uses "z"
> > as name of the variable?
>
> > I.e. to have __init__ function that creates
Terry Reedy wrote:
> machine. So this seems a timely idea. But I don't have a Playstation
> -- yet.
> tjr
have you priced them recently? I just looked and they are $200
less than the last time I looked -- eeks! Now _I_ want one!
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 03 Oct 2008 03:32:52 -0700, Michele Simionato wrote:
> IMO, if you have methods that you want to use in different classes, this
> is hint that
> you are in need of generic functions. See this blog post for an example:
>
> http://www.artima.com/weblogs/viewpost.jsp?thread=237764
That's a
On Fri, 03 Oct 2008 16:03:22 +0200, TP wrote:
> Hi everybody,
>
> I would like to be able to specialize an existing class A, so as to
> obtain a class B(A), with all methods of B being the methods of A
> preceded by a special method of B called _before_any_method_of_A( self
> ), and followed by a
On Fri, 03 Oct 2008 09:15:35 -0500, Grant Edwards wrote:
> On 2008-10-03, greg <[EMAIL PROTECTED]> wrote:
>> Lawrence D'Oliveiro wrote:
>>> In message <[EMAIL PROTECTED]>, Steven
>>> D'Aprano wrote:
>>>
>>> > (2) Even when the source is available, it is sometimes a legal trap
>>> > to read it wit
In message <[EMAIL PROTECTED]>, Valery
Khamenya wrote:
> things like urllib.quote(u"пиво Müller ") fail with error message:
> : u'\u043f'
Did you try encoding it as UTF-8 first?
--
http://mail.python.org/mailman/listinfo/python-list
In message <[EMAIL PROTECTED]>, Pat wrote:
> In module one, I have a function:
>
> def foo( host, userid, password ):
> pass
>
> In module two, I call that function:
>
> foo( userid, password)
>
> lint doesn't find that error and it won't be caught until it's called
> while the program is
Wing IDE 101
Version: 3.1.4-1 (rev 18789)
Release Date: September 18, 2008
from http://www.wingware.com/wingide-101
"Wing IDE 101 is a free basic edition of Wing IDE that was designed
with the University of Toronto Computer Science Department for
teaching entry level computer science courses with
On Fri, Oct 3, 2008 at 5:38 PM, Valery Khamenya <[EMAIL PROTECTED]> wrote:
> Hi all
> things like urllib.quote(u"пиво Müller ") fail with error message:
> : u'\u043f'
> Similarly with urllib2.
> Anyone got a hint?? I need it to form the URI containing non-ascii chars.
Do you know what, exactly, yo
> ... Unless, there is some corresponding distinction in mechanics
> between speaking and writing. That is, if something about the process
> of generating writing makes it, post-modification, easier. I'm going
> to assume that it's been observed across all modes of writing too, (in
> addition to
buytramadol
.
.
.
Enough to seek Tramadol! You've already found the best site where you
can purchase tramadol for lowest price!
Just click our link below and buy cheap tramadol
To order tramadol without prescription visit link below!
http://med247.us/?p=buy+tram
Hrvoje Niksic wrote:
greg <[EMAIL PROTECTED]> writes:
I don't think it has anything to do with variable leaking out of the
loop. Common Lisp doesn't leak the loop variable, and it behaves the
same. It is more a result of the different views of what iteration
is. Common Lisp and Python defin
Boris Borcic wrote:
Given the ABC innovation, maybe an infix syntax for isinstance() would
be good.
Possibilities :
- stealing "is" away from object identity. As a motivation, true use
cases for testing object identity are rare; forcing the usage of a
function or method to test it, would dis
Gabriel Genellina wrote:
En Fri, 03 Oct 2008 11:03:22 -0300, TP <[EMAIL PROTECTED]>
escribió:
I would like to be able to specialize an existing class A, so as to
obtain a
class B(A), with all methods of B being the methods of A preceded by a
special method of B called _before_any_method_of_A(
tramadol drug
.
.
.
Enough to seek Tramadol! You've already found the best site where you
can purchase tramadol for lowest price!
Just click our link below and buy cheap tramadol
To order tramadol without prescription visit link below!
http://med247.us/?p=buy+tr
On Fri, Oct 3, 2008 at 2:38 PM, Pat <[EMAIL PROTECTED]> wrote:
> I've been searching for a good multi-module lint checker for Python and I
> haven't found one yet.
>
> Pylint does a decent job at checking for errors only within a single module.
>
> Here's one of my problems. I have two modules.
>
On Oct 2, 6:06 pm, "Friedman, Jason" <[EMAIL PROTECTED]>
wrote:
> I have lines that look like this:
> select column1, 'select' as type
> from table
> where column2 = 'foo'
>
> I want to return:
> SELECT column1, 'select' AS type
> FROM table
> WHERE column2 = 'foo'
>
> This is SQL with the keywords
Devin a écrit :
(snip)
Oh. I read somewhere that UTF-8 variable names we're supported.
utf-8 is *not* unicode.
--
http://mail.python.org/mailman/listinfo/python-list
I have a large amount of data in a postgresql database with the
encoding of SQL_ASCII. Most recent data is UTF-8 but data from
several years ago could be of some unknown other data type. Being
honest with myself, I am not even sure that the most recent data is
always UTF-8-- data is entered on we
I've been searching for a good multi-module lint checker for Python and
I haven't found one yet.
Pylint does a decent job at checking for errors only within a single module.
Here's one of my problems. I have two modules.
In module one, I have a function:
def foo( host, userid, password ):
Hi all
things like urllib.quote(u"пиво Müller ") fail with error message:
: u'\u043f'
Similarly with urllib2.
Anyone got a hint?? I need it to form the URI containing non-ascii chars.
thanks in advance,
best regards
--
Valery
--
http://mail.python.org/mailman/listinfo/python-list
En Fri, 03 Oct 2008 17:46:31 -0300, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> escribió:
On 3 oct, 20:17, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>> I'm using SimpleHTTPServer (work well) but it always sends "Server"
>> header in response:
>> How can I remove that
next day tramadol
.
.
.
Enough to seek Tramadol! You've already found the best site where you
can purchase next day tramadol for lowest price!
Just click our link below and buy cheap tramadol
To order tramadol without prescription visit link below!
http://med247
On Oct 3, 4:10 pm, Rob Williscroft <[EMAIL PROTECTED]> wrote:
> Beliavsky wrote in news:d579f554-be4b-4066-acec-49a7bafb1046
> @t41g2000hsc.googlegroups.com in comp.lang.python:
>
> > I work for a financial company where we run Windows XP and read email
> > using Microsoft Outlook 2003. I get daily
Beliavsky wrote in news:d579f554-be4b-4066-acec-49a7bafb1046
@t41g2000hsc.googlegroups.com in comp.lang.python:
> I work for a financial company where we run Windows XP and read email
> using Microsoft Outlook 2003. I get daily files that come as email
> attachments from various counterparties. I
I've been experiencing an intermittent crash where no python
stacktrace is provided. It happens for a url downloading process that
can last up to 12 hours and crawls about 50,000 urls.
I'm using urllib2 for the downloads. There are 5-10 downloading
threads, and some custom website exploration co
I've been experiencing an intermittent crash where no python
stacktrace is provided. It happens for a url downloading process that
can last up to 12 hours and crawls about 50,000 urls.
I'm using urllib2 for the downloads. There are 5-10 downloading
threads, and some custom website exploration co
On Oct 3, 9:01 am, Beliavsky <[EMAIL PROTECTED]> wrote:
> I work for a financial company where we run Windows XP and read email
> using Microsoft Outlook 2003. I get daily files that come as email
> attachments from various counterparties. I save them as h:\firm_name
> \mmdd.csv . Would Python
greg a écrit :
Bruno Desthuilliers wrote:
OTHO, 'one class per file' is a standard idiom in Java and IIRC in C++
(which both have namespaces one way or another)
In Java you don't get a choice, because the compiler
assumes a class can be found in the correspondingly
named file.
For public cl
tramadol on line
.
.
.
Enough to seek Tramadol! You've already found the best site where you
can purchase tramadol online for lowest price!
Just click our link below and buy cheap tramadol
To order tramadol without prescription visit link below!
http://med247.us
On 3 oct, 20:17, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> >> I'm using SimpleHTTPServer (work well) but it always sends "Server"
> >> header in response:
> >> How can I remove that ?
>
> En Fri, 03 Oct 2008 11:11:34 -0300, Gary M. Josack <[EMAIL PROTECTED]>
>
dmitrey a écrit :
hi all,
I have a code
z = MyClass(some_args)
can I somehow get info in MyClass __init__ function that user uses "z"
as name of the variable?
I.e. to have __init__ function that creates field z.name with value
"z".
This has been debated to hell and back. To make a long story s
greg wrote:
jhermann wrote:
I didn't see this mentioned in the thread yet: the double-lambda is
unnecessary (and a hack).
Well, the alternative -- abusing default argument values --
is seen by many to be a hack as well, possibly a worse one.
I disagree. It is one way to evaluate an express
Hi Todd,
Thanks for your suggestions on using the Event condition methods on
this thread.
Here is my updated code :
import time
import datetime
import threading
def log(message):
now = datetime.datetime.now().strftime("%H:%M:%S")
print "%s : %s" % (now, message)
class StoppableThrea
Boris Borcic a écrit :
Given the ABC innovation, maybe an infix syntax for isinstance() would
be good.
Possibilities :
- stealing "is" away from object identity. As a motivation, true use
cases for testing object identity are rare;
"x is None" is a *very* common test. Using a _marker objec
lkcl a écrit :
On Oct 3, 10:29 am, Bruno Desthuilliers wrote:
lkcl a écrit :> On Oct 2, 7:42 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
lkcl a écrit :
And as far as I'm concerned, the point is
exactly here : it's doing "a little bit more" than the original code.
yeah, i know. a
On Oct 3, 2:29 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Devin wrote:
> > On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> >> "Martin v. Löwis" wrote:
> >>> Devin wrote:
> So Python can have unicode variable names but you can't
> "explode" (**myvariable) a dict with un
En Fri, 03 Oct 2008 15:04:01 -0300, dmitrey <[EMAIL PROTECTED]>
escribió:
I have a code
z = MyClass(some_args)
can I somehow get info in MyClass __init__ function that user uses "z"
as name of the variable?
I.e. to have __init__ function that creates field z.name with value
"z".
No. I'd jus
I'm trying to make a Tkinter/Python port of the demo at http://wiki.tcl.tk/10515
, which has adjustable alpha under Windows and (I think) MacOS.
I'm not quite sure how to port:
wm attributes . -alpha [expr {$alphaLevel + 0.05} ]
set AlphaLevel [wm attributes . -alpha]
The goal is to have
En Fri, 03 Oct 2008 12:27:50 -0300, Rich Henry <[EMAIL PROTECTED]>
escribió:
Made a simple little test program as im learning to embed python, have a
simple script that just sets x=10.0 in test.py and prints type(x). Python
prints that x is a float but PyFloat_Check() returns false. If i remov
Thanks!
cursor.rowcount does exactly what I need.
Before going any further... make sure that SQLite's count_change is
enabled:
PRAGMA count_changes
PRAGMA count_changes = 0 | 1
"Query or change the count-changes flag. Normally, when the
count-changes flag is not set, INSERT, UPDATE and DELET
greg wrote:
Steven D'Aprano wrote:
We agree that the restriction is artificial, and I think irrational
I think it's irrational for another reason, too -- it's
actually vacuous. There's nothing to prevent you creating
a set of patches that simply say "Delete all of the original
source and repl
generic tramadol
.
.
.
Enough to seek generic tramadol! You've already found the best site
where you can buy generic tramadol online for lowest price!
Just click our link below and buy cheap generic tramadol.
To order generic tramadol without prescription visit link below!
*
Announcing PyYAML-3.06
A new bug fix release of PyYAML is now available:
http://pyyaml.org/wiki/PyYAML
Changes
===
* setup.py checks whether LibYAML is installed and if so, builds
and installs LibYAML bindings. To force or disable
Devin wrote:
> On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
>> "Martin v. Löwis" wrote:
>>> Devin wrote:
So Python can have unicode variable names but you can't
"explode" (**myvariable) a dict with unicode keys? WTF?
>>> That works fine for me.
>> The OP probably means
>>
>>>
En Fri, 03 Oct 2008 11:03:22 -0300, TP <[EMAIL PROTECTED]>
escribió:
I would like to be able to specialize an existing class A, so as to
obtain a
class B(A), with all methods of B being the methods of A preceded by a
special method of B called _before_any_method_of_A( self ), and followed
On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> "Martin v. Löwis" wrote:
> > Devin wrote:
> >> So Python can have unicode variable names but you can't
> >> "explode" (**myvariable) a dict with unicode keys? WTF?
>
> > That works fine for me.
>
> The OP probably means
>
> >>> def f(a=1):
"Martin v. Löwis" wrote:
> Devin wrote:
>> So Python can have unicode variable names but you can't
>> "explode" (**myvariable) a dict with unicode keys? WTF?
>
> That works fine for me.
The OP probably means
>>> def f(a=1): return a
...
>>> f(**{"a": 42})
42
>>> f(**{u"a": 42})
Traceback (most
Devin wrote:
> So Python can have unicode variable names but you can't
> "explode" (**myvariable) a dict with unicode keys? WTF?
That works fine for me.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Vinay Sajip <[EMAIL PROTECTED]> wrote:
> Did you try setting logRequests to false?
Perfect, that's just what I needed.
Thanks Vinay!!
Mark
--
Mark Harrison
Pixar Animation Studios
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I'm using SimpleHTTPServer (work well) but it always sends "Server"
header in response:
How can I remove that ?
En Fri, 03 Oct 2008 11:11:34 -0300, Gary M. Josack <[EMAIL PROTECTED]>
escribió:
you've got ?self.send_header('Server', self.version_string()) in the
send
En Fri, 03 Oct 2008 09:07:21 -0300, Stef Mientki <[EMAIL PROTECTED]>
escribió:
Martin v. Löwis wrote:
1. how can I launch the windows help file (CHM), from python with a
keyword as argument ?
Run hh.exe. If you want it to navigate to specific page, also pass that
page on the command line (
So Python can have unicode variable names but you can't
"explode" (**myvariable) a dict with unicode keys? WTF?
-Devin
--
http://mail.python.org/mailman/listinfo/python-list
hi all,
I have a code
z = MyClass(some_args)
can I somehow get info in MyClass __init__ function that user uses "z"
as name of the variable?
I.e. to have __init__ function that creates field z.name with value
"z".
Thank you in advance, D.
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 3, 2008, at 2:33 PM, Matthias Huening wrote:
This seems not to work with sqlite3.
Before going any further... make sure that SQLite's count_change is
enabled:
PRAGMA count_changes
PRAGMA count_changes = 0 | 1
"Query or change the count-changes flag. Normally, when the count-
chan
On Oct 3, 9:03 am, TP <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I would like to be able to specialize an existing class A, so as to obtain a
> class B(A), with all methods of B being the methods of A preceded by a
> special method of B called _before_any_method_of_A( self ), and followed by
>
range(1,101), no?
On Tue, May 20, 2008 at 4:46 PM, Sells, Fred
<[EMAIL PROTECTED]> wrote:
> or
> for i in range(1,100):
> print ('fizz','','')[i%3] + ('buzz','','','','')[i%5] or i
>
>> >
>> > "Write a program that prints the numbers from 1 to 100. But for
>> > multiples of three print "Fizz" ins
On Oct 3, 5:10 am, "Tim Rowe" <[EMAIL PROTECTED]> wrote:
> 2008/9/30 Lie Ryan <[EMAIL PROTECTED]>:
>
> > Actually str.len and len(str) is just like saying "the string's length"
> > and "the length of the string". There is no difference between the two
> > except for personal preference. (I am no li
On Oct 3, 3:44 am, greg <[EMAIL PROTECTED]> wrote:
> jhermann wrote:
> > I didn't see this mentioned in the thread yet: the double-lambda is
> > unnecessary (and a hack).
>
> Well, the alternative -- abusing default argument values --
> is seen by many to be a hack as well, possibly a worse one.
>
Uwe Schmitt wrote:
> I have to parse some text which pretends to be XML. lxml does not want
> to parse it, because it lacks a root element.
> I think that this situation is not unusual, so: is there a way to
> force lxml to parse it ?
>
> My work around is wrapping the text with "..." before
> fee
Sean Davis wrote:
> I have an xml document and simply need to add an xml-stylesheet to
> it. I am using lxml to parse the xml document and then would like to
> insert the xml-stylesheet tag using the etree api. Any suggestions?
I assume you are talking about a processing instruction here, not a
hrishy wrote:
> I am validating a xmlfile against a xsd (My.xsd) but i notice that the xsd
> has a include which includes another xsd (My1.xsd)
>
> I have written a simple program that to validate this
>
> from lxml import etree
> xmlschemadoc=etree.parse("My.xsd")
> xmlschema=etree.XMLSchema(xm
Boris Borcic:
> - combining both keywords to create a third one, eg "is in"
A note only on syntax: "isa" seems better for Python. I don't comment
how useful it can be.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Made a simple little test program as im learning to embed python, have a
simple script that just sets x=10.0 in test.py and prints type(x). Python
prints that x is a float but PyFloat_Check() returns false. If i removed the
check and just force it to print the double value, its correct. Any ideas
w
Given the ABC innovation, maybe an infix syntax for isinstance() would be good.
Possibilities :
- stealing "is" away from object identity. As a motivation, true use cases for
testing object identity are rare; forcing the usage of a function or method to
test it, would dissuade abuse.
- allow
Tk/Tkinter apparently considers the position 1.13 to be after the last
word in the text. You get the same problem if you set the insertion
point just after the word 'two' for example: text.index('insert')
returns 1.7 and text.index('insert wordstart') returns 1.7 too...
Exactly.
My solution w
On 2008-10-03, J. Cliff Dyer <[EMAIL PROTECTED]> wrote:
>
> On Fri, 2008-10-03 at 09:15 -0500, Grant Edwards wrote:
>> On 2008-10-03, greg <[EMAIL PROTECTED]> wrote:
>> > Lawrence D'Oliveiro wrote:
>> >> In message <[EMAIL PROTECTED]>, Steven D'Aprano
>> >> wrote:
>> >>
>> >> > (2) Even when the s
Maybe you can use __getattribute__.
I tried it, but got stuck trying to let __getattribute__
work normal without calling itself.
class A(object):
def foo(self):
print "hi"
class B(A):
def __getattribute__(self,name):
try:
fun = A.__dict__[name]
except K
On Fri, 2008-10-03 at 09:15 -0500, Grant Edwards wrote:
> On 2008-10-03, greg <[EMAIL PROTECTED]> wrote:
> > Lawrence D'Oliveiro wrote:
> >> In message <[EMAIL PROTECTED]>, Steven D'Aprano
> >> wrote:
> >>
> >> > (2) Even when the source is available, it is sometimes a legal trap to
> >> > read i
In message <[EMAIL PROTECTED]>, Lie Ryan
wrote:
> ...python's docstring viewer has a less-like pager (or was it less) in
> Linux ...
It invokes whatever you define in $PAGER.
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-10-03, greg <[EMAIL PROTECTED]> wrote:
> Lawrence D'Oliveiro wrote:
>> In message <[EMAIL PROTECTED]>, Steven D'Aprano
>> wrote:
>>
>> > (2) Even when the source is available, it is sometimes a legal trap to
>> > read it with respect to patents and copyright.
>>
>> That's not how patents
you've got ?self.send_header('Server', self.version_string()) in the
send_response method of the BaseHTTPRequestHandler class in the
BaseHTTPServer module. Long story, short, it's going to be a lot of work
to get rid of.
[EMAIL PROTECTED] wrote:
Hello.
I'm using SimpleHTTPServer (work well)
Hi everybody,
I would like to be able to specialize an existing class A, so as to obtain a
class B(A), with all methods of B being the methods of A preceded by a
special method of B called _before_any_method_of_A( self ), and followed by
a special method of B called _after_any_method_of_A( self ).
> so, if i do this:
>
> d = dataListener()
> e = dataListener()
>
> d.data = "fred"
>
> print f.data
duh, duh - that should be print e.data :)
--
http://mail.python.org/mailman/listinfo/python-list
I work for a financial company where we run Windows XP and read email
using Microsoft Outlook 2003. I get daily files that come as email
attachments from various counterparties. I save them as h:\firm_name
\mmdd.csv . Would Python be a good tool to automate the process of
saving reports, or wou
On Fri, 03 Oct 2008 02:09:09 -0700, Carl Banks wrote:
> On Oct 2, 8:02 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> Then add subscription access too. By aliasing `__getitem__()` to
>> `__contains__()`. And `__setitem__()` could be implemented to add or
>> remove objects by assignin
I saw this (close to this anyway) lieing around on the internet and
was wanting to use it to define a start point exc but I need the
graphics to stay within a set y coords and I am not realy sure how to
do that. I have no idea on how to bind a min/max y to it. (the
concept is inspired by the java
Howdy Matthias!
The delete operation will set the rowcount member of your cursor.
Let's assume you have an sqlite3 database with a table called 'test'
with an id column. It does have a record with id=1. It does not have
a record with id=2.
>>> import sqlite3
>>> connection = sqlite3.connect('te
2008/10/3 Tim Rowe <[EMAIL PROTECTED]>:
> As others have said, no. What nobody seems to have said yet is why. If
> Y descends from X, you are saying that Y is an X; that a Y can be used
> anywhere an X can. If Y doesn't support some methods of X then it is
> *not* an X, and *can't* be used anywher
Hello.
I'm using SimpleHTTPServer (work well) but it always sends "Server"
header in response:
"Server: SimpleHTTP/0.6 Python/2.5.1"
How can I remove that ?
I tried:
self.server_version = ""
self.sys_version = ""
but the header is still sent, empty.
I there a way to remove the "Server:" head
Hi,
This is probably trivial, but I cannot find a solution right now.
With MySQLdb, I could test the success of a deleting action like this:
sql = "DELETE FROM table WHERE name='xxx'"
res = cur.execute(sql)
if res == 1:
print 'Okay'
else:
print 'nothing deleted'
This seems not to wor
Martin v. Löwis wrote:
1. how can I launch the windows help file (CHM), from python with a
keyword as argument ?
Run hh.exe. If you want it to navigate to specific page, also pass that
page on the command line (finding out the exact syntax is left as an
exercise)
That's one way,
in t
Hi
I am validating a xmlfile against a xsd (My.xsd) but i notice that the xsd has
a include which includes another xsd (My1.xsd)
I have written a simple program that to validate this
from lxml import etree
xmlschemadoc=etree.parse("My.xsd")
xmlschema=etree.XMLSchema(xmlschemadoc)
xmldoc=etree.p
2008/10/2 process <[EMAIL PROTECTED]>:
> Let's say I have a class X which has 10 methods.
>
> I want class Y to inherit 5 of them.
>
> Can I do that?
As others have said, no. What nobody seems to have said yet is why. If
Y descends from X, you are saying that Y is an X; that a Y can be used
anywhe
On Oct 3, 10:29 am, Bruno Desthuilliers wrote:
> lkcl a écrit :> On Oct 2, 7:42 pm, Bruno Desthuilliers
> > <[EMAIL PROTECTED]> wrote:
> >> lkcl a écrit :
> Not 'mine' - I'm not the OP.
whoops, yes - i missed that. sorry!
> And as far as I'm concerned, the point is
> exactly here : it's doing
Steven D'Aprano:
> Personally, I'd rather see dictionaries grow methods like
> symmetric_difference, union, etc. than worry about whether you use del or
> remove to remove elements from a set.
I have functions for all those operations, so I think they can be
useful, but in practice I don't use the
On Oct 2, 10:16 pm, process <[EMAIL PROTECTED]> wrote:
> Let's say I have a class X which has 10 methods.
>
> I want class Y to inherit 5 of them.
>
> Can I do that? Can I do something along the lines of super(Y, exclude
> method 3 4 7 9 10) ?
Don't use inheritance, use delegation or just copy the
lkcl a écrit :
On Oct 2, 7:42 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
lkcl a écrit :
(snip)
for fits and giggles, compile the above python using
pyjs.py, the python-to-javascript compiler
(seehttp://pyjamas.sf.net) and compare the
resultant javascript to your original code-fragment
Marc 'BlackJack' Rintsch:
> bearophile
> while xrange(n) is a bit less easy to
> > understand (a generator or generators).
I meant "a generator of generators", a typo, sorry. -.-
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Chris Rebert:
> So the improved code is:
> your_list.sort(key=lambda elem: (elem[3], elem[2]), reverse=True)
Better (untested):
from operator import itemgetter
...
your_list.sort(key=itemgetter(3, 2), reverse=True)
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
2008/9/30 Lie Ryan <[EMAIL PROTECTED]>:
> Actually str.len and len(str) is just like saying "the string's length"
> and "the length of the string". There is no difference between the two
> except for personal preference. (I am no linguist-- not even a native
> speaker of English --but I think ther
greg wrote:
>> class Mask(object):
>> def m3(self): raise NotImplementedError
>> def m4(self): raise NotImplementedError
>
>> What's the name of this python design pattern? :-)
>
> Don't know. Perhaps we could call it the FigLeaf pattern
> (covering up what you don't want seen)?
Braghettone ;)
greg <[EMAIL PROTECTED]> writes:
> The root of the problem actually has nothing to do with lambdas or
> static vs. non-static scoping. It's the fact that Python's for-loop
> doesn't create a new environment for the loop variable each time
> around, but re-uses a slot in the containing environment.
[EMAIL PROTECTED] wrote:
class Mask(object):
def m3(self): raise NotImplementedError
def m4(self): raise NotImplementedError
What's the name of this python design pattern? :-)
Don't know. Perhaps we could call it the FigLeaf pattern
(covering up what you don't want seen)?
There's a
Boris Borcic a écrit :
42, for instance.
Proof :
>>> 42 is not object
True
QED
Lol.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 03 Oct 2008 02:18:53 -0700, Carl Banks wrote:
> On Oct 2, 11:27 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
>> I didn't mean to imply that del a[1] would delete the first thing in
>> the set, but rather the item with a value of 1. Just as when we use it
>> on a dictionary:
>>
>> del a[1]
>
On Oct 2, 11:09 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Thu, 02 Oct 2008 07:51:30 -0700, Terrence Brannon wrote:
>
> > Basically, using non-strict dictionary keys can lead to bugs, so that
> > worried me.
>
> What's a "non-strict dictionary key"?
>
In Perl, you can
1 - 100 of 127 matches
Mail list logo