d hacks in to work around it (an easy one would be to prefix
autogenerated attributes, which also helps work around the lack of
private attributes in Python).
Whether or not this should be changed is tangential to the OP's point.
It must be a bit frustrating to state the obvious over and over and see
it misinterpreted each time. Python has shortcomings. This is one of
them, whether there's valid reasons for it or not. It's better to
acknowledge it and offer something useful rather than "that isn't the
Python way, don't do it."
Cliff
--
--
http://mail.python.org/mailman/listinfo/python-list
ne aware of any functional (doesn't need to be complete, beta is
fine) blog software written in Python?
Regards,
Cliff
--
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2006-09-13 at 00:29 -0700, Cliff Wells wrote:
> Anyone aware of any functional (doesn't need to be complete, beta is
> fine) blog software written in Python?
Hmph. And as soon as I hit send I find
http://wiki.python.org/moin/PythonBlogSoftware
Okay, so is there any *n
On Wed, 2006-09-13 at 08:22 -0700, Fuzzyman wrote:
> Cliff Wells wrote:
> > On Wed, 2006-09-13 at 00:29 -0700, Cliff Wells wrote:
> >
> > > Anyone aware of any functional (doesn't need to be complete, beta is
> > > fine) blog software written in Python?
>
t;
> patch here:
>
> http://mail.python.org/pipermail/python-list/2001-June/047996.html
Did you happen to remember this post or is Google *really* your friend?
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2006-09-13 at 19:28 +0200, Irmen de Jong wrote:
> Cliff Wells wrote:
> > I'm currently using Frog, and it's decent, but lacks some fundamental
> > features (tags for one). Since Irmen is probably going to scrap it
> > anyway, I'm kind of fishing about
work with threads:
http://docs.python.org/lib/module-signal.html
Regards,
Cliff
--
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2006-09-14 at 03:22 -0700, Cliff Wells wrote:
> They probably use signals (Twisted I'm sure does) and it's documented
> that signals don't work with threads:
>
> http://docs.python.org/lib/module-signal.html
Er, specifically, they only work with the main t
?
4) How much alcohol will be required to forget all this when I'm done?
Thanks,
Cliff
--
--
http://mail.python.org/mailman/listinfo/python-list
p may
have expression-based syntax and macros, but it's also got Eric Naggum.
If we can't have the nice features of Lisp, let's at least not adopt its
downsides.
Regards,
Cliff
P.S. As a disclaimer, I *have* had a few beers tonight already and
have, in fact, been binge-coding
ant whitespace in Python but let's not pretend
there isn't at least a small penalty. And I strongly suspect Python's
varied syntactical rules impose far more of a "load" on code editors
than Lisp does (it certainly offers more opportunity for the editor to
do the wrong thing).
Regards,
Cliff
>
--
http://mail.python.org/mailman/listinfo/python-list
lities? Which method should be called? Better to explicitly call
the desired method. Multimethods may make sense in many languages but
not so much in Python.
Regards,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
nterest you:
http://breve.twisty-industries.com
Regards,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
designed to not dispatch based on type, but quite frankly it works quite
elegantly and naturally for everything but this one case.
Just pointing out that just because we don't see a need for something
doesn't invalidate it. It just makes it something we had thought of ;-)
Regards,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
luctant to claim it
would never be of use.
> I agree, but without a use case it's hard to understand the limits and
> needs of a requirement. So if you can't think of a need for a feature,
> it becomes difficult to understand how you might implement that
> feature.
Certainly. Several years of using Python has never suggested a use to
me prior to this.
Regards,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2007-01-24 at 11:37 -0800, Cliff Wells wrote:
>
> class Person: # assume this is something from the ORM
> name = "Kenny"
>
> class PersonRow ( Person ):
> pass
>
> def flatten_person ( p ):
> return "omg, you've kil
On Wed, 2007-01-24 at 14:57 -0800, Robert Brewer wrote:
> 1. Expressions: pure Python lambda querying. This is perhaps the most
>appealing feature of Dejavu.
Actually I just went and looked and personally I find the documentation
the most appealing feature.
Regards,
Cliff
--
ipe/438823
> 3webXS HiSpeed Dial-up...surf up to 5x faster than regular dial-up alone...
> just $14.90/mo...visit www.get3web.com for details
You pay $15/mo for dialup???
Regards,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 5, 11:57 am, [EMAIL PROTECTED] wrote:
> On Nov 3, 7:57 am, André <[EMAIL PROTECTED]> wrote:
>
> > I just installed Leopard on my Mac. I already was using Python 2.5.
> > I can run a Python script from a terminal window by typing "python
> > script.py" as one would expect ... but not using
e). Unfortunately it's nowhere near Python in
completeness (notably documentation, size of community and overall
maturity) and, for better or worse, it runs on .NET/Mono.
Regards,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
odule was deemed
appropriate for inclusion in the standard libraries.
Whether or not anyone agrees with this point of view is now mostly
irrelevant, since *by definition* the Python csv module intends to
implement a protocol. Other implementations remain free to vary in
their definition of CSV.
Regards,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
I admit looking at the source won't make you think so ;-)
Regards,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
For those of you using emacs, here's the elisp code that allows you to
syntax color computer language source code in your blog or website.
http://xahlee.org/emacs/elisp_htmlize.html
to comment, here:
http://xahlee.blogspot.com/2009/01/dehtmlize-source-code-in-emacs-lisp.html
Xah
://trac.puremvc.org/Demo_Python_GoogleAppEngine_Blog
-=Cliff>
--
http://mail.python.org/mailman/listinfo/python-list
arg = self.meth1()
> >
> > but I'm looking for a more straightforward way.
>
> You can write this as:
>
> def meth2(self, arg=None):
> arg = arg or self.meth1()
>
> IMHO - You can't get much more "straightforward" than that.
What if arg is 0 an empty list or anything else that's "False"?
def meth2(self, arg=None):
arg = (arg is not None) or self.meth1()
is what you want.
Regards,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
hould work, but there
is not a lot of people doing this or posting notes about their install
problems or successes on HP-UX.
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
this work?). Python -v did, however, and it came up with a
number of unresolved symbols all seeming to be from libnnz11.so. I tried
linking against all of the *.so files in ORACLE_HOME/lib, but I don't
remember trying libttsh11 specifically. I will try it again on Monday.
--
Cliff
On Sat, A
including libttsh11 fixed the problem. Thank you!
Now I can get on with fixing everything that Python 3 broke... err changed.
:)
--
Cliff
On Sat, Aug 28, 2010 at 11:20 AM, Alexander Gattin wrote:
> Hello,
>
> On Sat, Aug 28, 2010 at 09:27:05AM -0400, Cliff
> Martin wrote:
On Thu, 2012-06-21 at 21:25 +1000, John O'Hagan wrote:
> Sometimes a function gets called repeatedly with the same expensive argument:
>
> def some_func(arg, i):
> (do_something with arg and i)
>
> same_old_arg = big_calculation()
> for i in lots_of_items:
> some_func(same_old_arg, i)
>
as discovered in python 2.6. In python 3.2, both versions fail
with the same NameError.
Obviously, this is easy enough to work around. I'm curious though:
What's going on under the hood to cause the nested generator expression
to fail while the list comprehension succeeds?
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
Binding"
http://www.python.org/dev/peps/pep-0289/#early-binding-versus-late-binding
Cheers,
Cliff
On Tue, 2012-03-20 at 16:50 -0600, Ian Kelly wrote:
> On Tue, Mar 20, 2012 at 3:16 PM, Dennis Lee Bieber
> wrote:
> > On Tue, 20 Mar 2012 16:23:22 -0400,
Write a context manager.
Then you just do
with MyLDAPWrapper() as ldap
ldap.this()
ldap.that()
and when you leave the scope of the with statement, your ldap __exit__
method will get called regardless of how you left.
Cheers,
Cliff
On Wed, 2012-03-21 at 19:30 +, John Gordon wrote
2008/10/why-explicit-self-has-to-stay.html
Cheers,
Cliff
On Thu, 2012-03-22 at 13:15 +, Andrea Crotti wrote:
> On 03/22/2012 10:51 AM, Steven Lehar wrote:
> > It seems to me that the Python class system is needlessly confusing.
> > Am I missing something?
> >
> >
hen format them using
standard string formatting operations when you want to print them.
There's more information on how to do formatting here:
http://docs.python.org/library/stdtypes.html#string-formatting
Cheers,
Cliff
On Mon, 2012-03-26 at 04:45 -0700, redstone-c...@163.com
u've created the next
token, a string literal, that the parser discovers the error: you can't
have a string literal following a variable.
*You* think your error is that you misspelled "print." The parser
thinks your error is trying to put a string literal next to a variable.
data into useful python objects, and from python objects to
displayable values.
http://www.formencode.org/en/latest/Validator.html
Might be what you're looking for.
Cheers,
Cliff
On Mon, 2012-04-02 at 14:55 +0200, Stéphane Klein wrote:
> Hi,
>
> I look for a package to make
On Thu, 2012-06-07 at 16:04 +, Julio Sergio wrote:
> Up to this point it worked as expected. However, when I tryied with the
> methods
> that write and read several lines, apparently the process got stalled:
>
> ->>> fi.writelines(["uno\n","dos\n","tres\n"])
> ->>> fi.flush()
> ->>> s = fo.
It is for reading all the lines from a complete file. If the file is
still being written to, it doesn't have an end yet. File objects do
many things besides RPC. Also, there are instances where all you want
to do is block until the file is done, and then get all the content.
readlines will do th
source code at a given revision.
Cheers,
Cliff
On Sat, 2012-06-16 at 13:24 +1000, Mark Livingstone wrote:
> Hello!
>
> I wish to properly cite Python in an academic paper I am writing.
>
> Is there a preferred document etc to cite?
>
> Thanks in advance,
>
>
end(testCase1)
testCaseList.append(testCase2)
for testCase in testCaseList:
testCase()
Also, as python allows direct iteration over a list, you'll find that
you don't need to create loops on an incrementor variable. Just loop on
the list itself.
I suspect lambda might be
Neil Cerutti wrote:
On 2007-08-22, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
While it is desireable to not only write working, but also
aesthetically pleasing code, as a beginner you shouldn't worry
too much. The sense of aesthetics develops with time. Important
is to try and grasp the idio
r
unclosed quotes, parens, brackets, etc. becomes second nature. And make
sure you quote ALL strings. Some languages are forgiving on this
count. Python is not.
Blessings to all, and may all find their good cheer restored by some
rest. I offer you both a virtual pint. You seem like you could use it.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
Tim Williams wrote:
On 23/08/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,
I have a bunch of files that have changed from standard htm files to
php files but all the links inside the site are now broken because
they point to the .htm files while they are now .php files.
Does anyone h
'.htm','.php')
I make no claims about what the surrounding code should look like.
You've gotten a number of responses on that already.
Cheers,
Cliff
Sébastien N wrote:
It's a fact, but still I went on with the solution that overwrites all
the .htm because i
h
> but since in the real world, CC inherits from his baseclass, the above
> assignment causes the baseclass to be altered. :-(
>
> Please tell me if I need to provide more.
>
>
Is there a reason you don't just create a subclass for the one that
needs to call repmeth?
class CC(object):
def m1(self):
print "m1"
def m2(self):
print "m2"
class SpecialCC(CC):
def m1(self):
print "something else!"
if __name__ == '__main__':
a = CC()
b = SpecialCC()
for instance in a, b:
instance.m1()
instance.m2()
--Output--
m1
m2
something else!
m2
Is that what you're looking for, mas o menos?
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
I don't know if this is pythonic or not, but try something like this:
from math import log
from random import randint
def: skewedrandom(n):
int(log(randrange(1,n), 2))
Play with your log to get the range you want
Cheers,
Cliff
Grant Edwards wrote:
On 2007-08-27, Jun-geun Park &l
Gary Herron wrote:
luca bertini wrote:
Hi,
i have strings which look like money values (ie 34.45)
is there a way to convert them into float variables?
everytime i try I get this error: "numb = float(my_line) ValueError:
empty string for float()"
"
here's the code
import sys
Torsten Bronger wrote:
Hallöchen!
Tom Brown writes:
[...] Python has been by far the easiest to develop in. Some
people might say it is not "real programming" because it is so
easy.
I can't believe this. Have you really heard such a statement?
Tschö,
Torsten.
The catch-phrase s
Turbo C will always yield a number such that if x = m%n -x = -m%n. That
is, since 111 % 10 = 1, -111 % 10 = -1. The two values will always
differ by n (as used above).
I'm sure there are mathematicians on the list who can give you a more
technical, precise explanation of the rea
J. Cliff Dyer wrote:
Lawrence D'Oliveiro wrote:
In message <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote:
What's wrong with this:
for Link in GetEachRecord(
Then you're no longer showing the syntax structure in two dimensions.
If somebody handed me a
to be perfectly clear, you don't type the $. It's already
there for you, in some form; your prompt may not be a $.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
handle this
limitation. UTF-16 is based on a two-byte unit, but is variable
width, like UTF-8, which makes it flexible enough to handle any code
point, but harder to process, and a bear to seek through to a certain
point.
(I'm politely ignoring your ill-reasoned attacks on non-Microsoft OSes).
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
\ "Try to become not a man of success, but try rather to
>> become a | `\ man of value."
>> -Albert Einstein | _o__)
>> | Ben Finney
>
> What is the difference between this version and the 1.0 version?
>
Uh... The 1.0 version is vaporware?
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
time before the 1999 standard. C89,
commonly called ANSI C, is still very commonly used in compilers, and
K&R C goes back to 1972. Is truncation toward 0 the standard for K&R C
as well?
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
> elif testResult == TestOutcomes.FAILED :
> testResultAsString = "Failed"
> else:
> testResultAsString = "Aborted"
> return testResultAsString
>
> Regards,
>
> Zara
>
>
This code cannot output "Unknown," because you use an else: at the end
of your if-chain to represent a specific (non-catch-all) case.
s/else:/elif testResult == TestOutcomes.ABORTED:/
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
bambam wrote:
> import works in the main section of the module, but does
> not work as I hoped when run inside a function.
>
> That is, the modules import correctly, but are not visible to
> the enclosing (global) scope.
>
> Questions:
> (1) Where can I read an explanation of this?
> (2) Is there a
l of that
mess, is the run-ins involving " characters. The rest are at least
clear at a glance what belongs where.
Also, would you require the following?
my_function (swallow='European')
Because that is just an awful use of whitespace.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
Marc 'BlackJack' Rintsch wrote:
> But please don't use the functions in `string` that are also available as
> methods on strings. Those functions are deprecated.
>
>
Meaning (for newbie clarification):
instead of string.upper(s2), just do s2.upper(). For more detail, see
the docs.
--
http
>
> to me it sounds a bit different from the original request, but...
>
>
That's because it's the next problem on his homework assignment. See
also the thread entitled: "generating list of sub lists.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
Does anybody know a good solution (preferably in python) for rasterizing
SVG or other vector graphics.
I'm thinking something like
vector_image = SVGFile(path_to_image)
raster_image = vector_image.rasterize(format, (width, height), dpi)
raster_image.write(out_file)
Thanks for any pointers you mi
Stefan Behnel wrote:
> J. Cliff Dyer wrote:
>
>> Does anybody know a good solution (preferably in python) for rasterizing
>> SVG or other vector graphics.
>>
>> I'm thinking something like
>>
>> vector_image = SVGFile(path_to_image)
>>
allow you to import all names from a module, unprefixed but
it leads you into the same ugliness and namespace clobbering that you
get with Perl, so I'm not going to tell you how to do it.
I think the 'import long.name as short' syntax will help your wrists the
most while still retaining the clarity of explicit module referencing.
And you won't have the extraneous assignment (tmp = long.name)
cluttering up your code.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
ormat
Unicode Document
If Microsoft offers to create documents in three different formats with
the same extension, it damn well better make some effort to figure out
which one it's trying to open when it reopens those same documents.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
the
most is not a fancy trick for getting rid of the namespace, but getting
over your aversion to them. That will make you a better programmer, in
the long run. Debugging will be easier, people will enjoy working with
your code more. Clarity is beautiful. Objectively so. Not just some
lame "in the eye of the beholder" kind of beautiful.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
_init_
> business that many sites mention. (This *is* something even a newbie
> needs to learn, right?)
>
Try this chapter from Diving into Python:
http://www.diveintopython.org/object_oriented_framework/defining_classes.html
> Thank you!
>
> M.R.S.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
f strings. If you want to pass that
result on to a for loop, and only loop once on the string (instead of
looping on each letter of the string), you might want to wrap it in a
tuple or a list before passing it to the loop.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
J. Cliff Dyer wrote:
> John J. Lee wrote:
>
>> Peter Otten <[EMAIL PROTECTED]> writes:
>> [...]
>>
>>
>>> def f(s):
>>> return (s,)
>>>
>>>
>> Forgive me if this is a stupid question, but: W
on whether it is
greedy or non greedy, will either spit out ['STARTdefSTARTghiEND'] or
['STARTghiEND'].
Correction, it will spit out the first one, whether greedy or not. The
difference comes with two END tags in a row.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
been
rejected because of this very problem, so unless you have a clean
solution, I think your proposal falls into the category of "would be
nice, but not in Python."
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
re also raw. Also use them when talking about escape sequences
like \n"
r"""Same for "\n" Here"""
u'Unicode strings are useful for multilingual or non-latin text.
I\u2019d recommend reading more about Python's unicode handling. It can
be a bit tricky for newcomers.'
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
statement that DST and half-hour offsets "only matter[] if you're
setting your clock." None of those are meaningful with 25 generic time
zones, which was what I was trying to understand. Under what normal
circumstances (outside of the US military creating an approximation for
their own internal usage) could 25 tzs be a useful abstraction?
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
n the world who see their minority Uighur brethren as
oppressed by the authorities of Beijing. On the other hand, you might
annoy the authorities in Beijing. Which is just to say that choice of
time zone is not just a geographic issue. There are political,
diplomatic issues to weigh as well.
quot; which has the ugly side effect that
the poster of the message I'm responding to gets 2 copies, unless I
remember to delete one of them.
Same method with mutt, though I'm sure I could customize mutt to pay
better attention to the headers, if I used it enough to bother.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
fine, but the server rejected the
client's request. So now the issue is why is the request being
rejected? Did you check your firewall to see if it is blocking access
to port 8000 on the ethernet adapter?
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
Your else statement is incorrectly indented. The interpreter treats it
as part of the for-loop construct inside the if statement rather than as
part of the if statement itself. See the recent thread about for-else
constructs for more details.
If your problem is not obvious yet, make sure you are
bigden007 wrote:
> Hi,
> I have a if..else statement in my script. The statements all execute
> fine, but the problem is , even if the IF part of the statement is
> true, the else part executes as well. The verion of pythin i use 2.5
> Any help is appreciatiated.
>
> Regards
>
> Big Den.
>
>
You
000L
Do you really need more than 700 places of precision? Once your numbers
are that large, surely you can use integer math, right? (FYI 5 * (10 **
1) works just as well.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
ity of meaning for brevity.
>
> Matt
My only problem with Decimal("12.34") is the quotation marks. It makes
it look like a string type.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
, Aug 31 2007, 16:54:27) [MSC v.1310 32 bit
(Intel)] on win32
>>> type(0b1)
>>> type(0o1)
>>> type(0x1)
>>> assert 0b1 is 0x1
>>>
>>> type(0d1)
>>> assert 0b1 is 0d1
Traceback (most recent call last):
File "", line 1, in
assert 0b1 is 0d1
AssertionError
It would also be unkind to people with dyslexia.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
mputer. If a basic cleaning
doesn't take care of the problem, take your computer to a professional.
Cheers,
Cliff
P.S. This is not a python-specific issue.
--
http://mail.python.org/mailman/listinfo/python-list
if ai == "2":
> ai = "paper"
> if ai == "3":
> ai = "scissors"
>
> since it says I choose
>
>
Lo and behold: it *is* ignoring that block. Why? Or in other words
what set of conditions have to be true in order to reach that block?
Which one of them is false? (Hint: Check your while loops, and your
initialization variables.)
Also, Why not use decision = ('rock', 'paper', 'scissors')?
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
at the octal argument as a string, rather than an int:
os.chmod(filename, "777")
If somebody had a good *general* use for octal, it might be worth having
in the language. Otherwise, it seems like an unused which is only kept
around because it used to get played with. (back in the days of six bit
hardware?)
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
uceXML(node[2])
>
> N.B. Beware of stack limitations.
>
>
Also, as noted elsewhere in the string, your C is actually a list of
Cs. So replace my else statement with
return [(child[0], reduceXML(child[2])) for child in node]
I think that'll do what you need. Howe
import it from __future__ yourself. Don't break all current code by
recompiling python to do it. You'll alienate most of your potential
user base, and develop a reputation for not playing well with others.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
ead,
try calling:
webbrowser.open("documents/tut.html")
If that works, also try
webbrowser.open("/home/krishna/documents/tut.html")
I suspect both of those will work. There must be some other syntax for
opening URLs directly. Or maybe it interoperates with urllib.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> On Wed, 31 Oct 2007 22:48:12 -0700, Carl Banks wrote:
>
>
>>> I hope you're not serious that $# would make a good operator.
>>>
>> If you happen to know where I borrowed it from, it would be pretty
>> evident that I wasn't being serious.
>>
>
> Ooh, now I'm c
;
If you take out the space between text/html and ; it works just fine.
(In other words, there is no mime-type "text/html ")
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
double quotes within the string, of
course), so python sees a \P, a \L a \s, and a \m in your string. There
are two ways to solve this:
1) Use a raw string: r'D:\Python24\Lib'
2) Escape your backslashes: 'D:\\Python24\\Lib'
I assume the real value of 'mycode' has a
You don't need regular expressions to do that. Look into the methods that
>> strings have. Look at slicing. Look at len. Keep your code readable for
>> future generations.
>>
>> Py>>> help(str)
>> Py>>> dir(str)
>> Py>>> hel
the camp that believes that 3/4 does indeed yield the integer 0,
but should be spelled 3//4 when that is the intention.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 2008-02-26 at 04:29 -0800, Lie wrote:
> > J Cliff Dyer:
> > I'm in the camp that believes that 3/4 does indeed yield the integer
> 0,
> > but should be spelled 3//4 when that is the intention.
>
> That's creepy for people that are new to programming
On Tue, 2008-02-26 at 10:08 -0500, D'Arcy J.M. Cain wrote:
> On Tue, 26 Feb 2008 06:45:45 -0800 (PST)
> Carl Banks <[EMAIL PROTECTED]> wrote:
> > On Feb 26, 9:29 am, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote:
> > > If 3/4 ever returned 0.75 in any language I would drop that language.
> >
> > Ha
On Tue, 2008-02-26 at 13:51 -0500, D'Arcy J.M. Cain wrote:
> On Tue, 26 Feb 2008 13:39:38 -0500
> "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote:
> > >>> a = 2 * 2
> > >>> b = 20 * 20
> > >>> type(a)
> >
&
On Thu, 2008-02-28 at 11:22 -0500, D'Arcy J.M. Cain wrote:
> Not obvious to you. You are using subjective perception as if it was
> a
> law of nature. If "obvious" was the criteria then I would argue that
> the only proper result of integer division is (int, int). Give me the
> result and the re
On Fri, 2009-01-16 at 08:57 +, Steven D'Aprano wrote:
> On Fri, 16 Jan 2009 10:03:28 +0200, Hendrik van Rooyen wrote:
>
> > Oh come on you lot - you are carrying on as if Diez were wearing his
> > skull socks again - do me a favour and give him a break!
> And... skull socks? Cool. Where can
I dub it Schluehr's law.
On Thu, 2009-01-22 at 21:39 -0800, Kay Schluehr wrote:
> Whatever sufficiently sophisticated topic was the initially discussed
> it ends all up in a request for removing reference counting and the
> GIL.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
On Sun, 2009-01-25 at 18:23 -0800, John Machin wrote:
> On Jan 26, 1:03 pm, "Gabriel Genellina"
> wrote:
> > En Sun, 25 Jan 2009 23:30:33 -0200, Tim Chase
> > escribió:
> >
> >
> >
> > > Unfortunately, a raw rstrip() eats other whitespace that may be
> > > important. I frequently get tab-de
know that.
>
> So yay for Python, but don't get in the habit of criticising that which
> you do not know.
There are legitimate reasons to criticize things even when they are
powerful.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
l and fun. But scary. Any thoughts on how
you would use that in a way that wouldn't unleash sulphurous code
smells?
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
101 - 200 of 340 matches
Mail list logo