On Sun, Jul 11, 2010 at 12:03 AM, rantingrick wrote:
> This is another example of the damage integer booling does to your
> code and your mind. What happened to explicit is better than implicit?
Explicit is better than implicit. Hence, if you're specifically
testing for the property of not being
On Sun, Jul 11, 2010 at 12:57 AM, Ian Kelly wrote:
> And I think that partly this is simply historical. Before a proper
> boolean type was added to Python, 1 and 0 were the norm for storing
> truth values. Changing the truth value of 0 when bools were
> introduced would have broken tons of exist
* rantingrick, on 11.07.2010 08:50:
On Jul 11, 1:22 am, Stephen Hansen wrote:
Utter nonsense. No one does that unless they are coming from C or some
other language without a True/False and don't know about it, or if they
are using a codebase which is supporting a very old version of Python
bef
On 7/10/10 11:50 PM, rantingrick wrote:
> On Jul 11, 1:22 am, Stephen Hansen wrote:
>
>> If you are so desperately concerned with space, then simply do:
>>
>> if (choiceIdx1, choiceIdx2) != (None, None):
>>
>> Its only eleven characters longer.
>>
>> Or, you can do:
>>
>> if None not in (
Another source of asininity seems to be the naming conventions of the
Python language proper! True/False start with an upper case and i
applaud this. However str, list, tuple, int, float --need i go
on...?-- start with lowercase.
Q: Well what the hell is your problem Rick. Who cares right?
WRONG
* Stephen Hansen, on 11.07.2010 09:19:
On 7/10/10 11:50 PM, rantingrick wrote:
It was a typo not an on purpose misspelling
If this had been the first time, perhaps. If you had not in *numerous*
previous times spelled my name correctly, perhaps. If it were at all
possible for "f" to be a typo
* rantingrick, on 11.07.2010 09:26:
Another source of asininity seems to be the naming conventions of the
Python language proper! True/False start with an upper case and i
applaud this. However str, list, tuple, int, float --need i go
on...?-- start with lowercase.
Q: Well what the hell is your
rantingrick writes:
> unspeakably ugly code.
I'd write the code differently to not do all those branches.
I like to use 1-elemnt lists as an option type, instead of using None,
so you can just concatenate them together to get the first non-empty
one. Untested code:
array = [c1,c2,c3,c4,c5,c
On 7/11/10 12:30 AM, Alf P. Steinbach /Usenet wrote:
> * Stephen Hansen, on 11.07.2010 09:19:
>> On 7/10/10 11:50 PM, rantingrick wrote:
>>>
>>> It was a typo not an on purpose misspelling
>>
>> If this had been the first time, perhaps. If you had not in *numerous*
>> previous times spelled my name
rantingrick wrote:
>Another source of asininity seems to be the naming conventions of the
>Python language proper! True/False start with an upper case and i
>applaud this. However str, list, tuple, int, float --need i go
>on...?-- start with lowercase.
>
>Q: Well what the hell is your problem Ric
On Jul 11, 2:19 am, Stephen Hansen wrote:
> Nonsense.
>
> Prove it. Show actual benchmarks and actual problems to that style.
I can't believe i actually have to prove to you that creating a tuple
and then testing for bool-inity takes more time than just the bool
test, but here goes *another* Sun
On Jul 11, 2:39 am, Paul Rubin wrote:
> rantingrick writes:
> > unspeakably ugly code.
>
> I'd write the code differently to not do all those branches.
> I like to use 1-elemnt lists as an option type, instead of using None,
> so you can just concatenate them together to get the first non-empty
>
On Jul 11, 3:03 am, "Günther Dietrich"
wrote:
> So, it is not a disadvantage that the functions you listed above are
> named in this way. In the contrary, it is an advantage, as it keeps
> newcomers from using stupid variable names.
"int" for an Integer is stupid?
"list" for a List is stupid?
"s
> from m import f
>
> look for module m in the global cache
> if not there, then:
> search for m.py
> compile it to a Module object
> put the Module object in the cache
> look for object named "f" in the Module object
agree
> create a new name "f" in the local namespace
> set the name
On 07/11/2010 10:30 AM, rantingrick wrote:
> On Jul 11, 3:03 am, "Günther Dietrich"
> wrote:
>
>> So, it is not a disadvantage that the functions you listed above are
>> named in this way. In the contrary, it is an advantage, as it keeps
>> newcomers from using stupid variable names.
>
> "int" f
On Jul 9, 4:44 pm, Simon Brunning wrote:
> On 9 July 2010 14:17, kak...@gmail.com wrote:
>
> > Hi to all, i want to stress test a tomcat web server, so that i
> > could find out its limits. e.g how many users can be connected and
> > request a resource concurrently.
> > I used JMeter which is a
"rantingrick" wrote in message
news:1b285203-33f6-41fb-8321-381c154bc...@w12g2000yqj.googlegroups.com...
Let me tell you folks about a recent case of culo rojo i experianced
whilst creating a customized bin packer with Python. First i want to
say that i actually like the fact that i can do thi
On Sun, 11 Jul 2010 00:26:36 -0700 (PDT)
rantingrick wrote:
> Another source of asininity seems to be the naming conventions of the
> Python language proper! True/False start with an upper case and i
> applaud this. However str, list, tuple, int, float --need i go
> on...?-- start with lowercase.
2010-07-11 02:12, Ritchy lelis skrev:
On 7 jul, 08:38, Johan Grönqvist wrote:
About the plot draw it's a curve that it's a set of points wich it's
the result of the comput of the Vref and Vi together. I don't know if
i had to make a break instruction (like in other's languages) after
the "If" i
hi.
i need to know the type of variable i'm dealing with.
take this list:
files = [
"lib/jquery/jquery-1.4.2.source.js",
"lib/jquery-ui-1.8.1/development-bundle/ui/jquery-ui-1.8.1.custom.js",
"lib/jquery-ui-1.8.1/development-bundle/ui/jquery.ui.tabs.js",
"lib/jque
Hi,
I wanted to figure out whether a given path name is below another path name.
Surprisingly this turned out to be more difficult than initially
anticipated:
Let's assume I want to find out, whether path1 is below path2
First I thought about checking whether
path1 starts with path2
For this
On 11-7-2010 14:23, Rene Veerman wrote:
hi.
i need to know the type of variable i'm dealing with.
take this list:
files = [
"lib/jquery/jquery-1.4.2.source.js",
"lib/jquery-ui-1.8.1/development-bundle/ui/jquery-ui-1.8.1.custom.js",
"lib/jquery-ui-1.8.1/development-bundl
Andre Alexander Bell wrote:
> On 07/11/2010 10:30 AM, rantingrick wrote:
>>> So, it is not a disadvantage that the functions you listed above are
>>> named in this way. In the contrary, it is an advantage, as it keeps
>>> newcomers from using stupid variable names.
>> "int" for an Integer is stupi
On 07/11/2010 03:37 PM, Gelonida wrote:
> #
> import os
> def is_below_dir(fname,topdir):
> relpath = os.path.relpath(fname,topdir)
> return not relpath.startswith('..'+os.sep)
>
> print is_below_dir(path1,path2)
> ###
In article ,
Luke Kenneth Casson Leighton wrote:
>
>$ python grail.py (note the lack of "python1.5" or "python2.4")
Congrats!
--
Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/
"Normal is what cuts off your sixth finger and your tail..." --Siobhan
--
http://
In article ,
rantingrick wrote:
>
>Congratulations on this effort Luke. However you know what project i
>would really like to see the community get around? ...dramatic pause
>here... a cross platform Python file browser! Yes i know there are
>tons of them out there already and Python is a bit slo
On Sun, 11 Jul 2010 15:46:40 +0200 News123 wrote:
> Andre Alexander Bell wrote:
> > On 07/11/2010 10:30 AM, rantingrick wrote:
>
> >>> So, it is not a disadvantage that the functions you listed above
> >>> are named in this way. In the contrary, it is an advantage, as it
> >>> keeps newcomers fr
Hi Thomas,
Thomas Jollans wrote:
> On 07/11/2010 03:37 PM, Gelonida wrote:
>> #
>> import os
>> def is_below_dir(fname,topdir):
>> relpath = os.path.relpath(fname,topdir)
>> return not relpath.startswith('..'+os.sep)
>>
>> print is_below_dir(
Andreas Waldenburger wrote:
>
> Having capitalized boolean values ... that is a bit odd, but as long as
> children are starving in Africa, this isn't very high on my gripe-list.
>
+1
--
http://mail.python.org/mailman/listinfo/python-list
Folks:
I have been (I admit it) a Python 3 skeptic. I even speculated that
the Python 3 backward-incompatibility would lead to the obsolescence
of Python:
http://pubgrid.tahoe-lafs.org/uri/URI:DIR2-RO:ixqhc4kdbjxc7o65xjnveoewym:5x6lwoxghrd5rxhwunzavft2qygfkt27oj3fbxlq4c6p45z5uneq/blog.html
Howev
Why doesn't python's list append() method return the list itself? For
that matter, even the reverse() and sort() methods?
I found this link (http://code.google.com/edu/languages/google-python-
class/lists.html) which suggests that this is done to make sure that
the programmer understands that the l
On 07/11/2010 12:50 AM, rantingrick wrote:
> Ah yes, when nothing else seems to work fall back to you default
> programming... FUD and ad hominem attacks
Please stop calling things what they are not. Stephen's post was not an
ad hominem attack, nor was it FUD. Someone who is countering your
pre
On Jul 11, 9:01 am, a...@pythoncraft.com (Aahz) wrote:
> As usual, you would rather tell other people what to do instead of doing
> any work yourself.
Dear God! My statement was intended to fetch responses like...
"Hey, that sounds like a great idea" or \
"Hey, lets get hacking on this".
I
On 07/11/2010 05:59 PM, dhruvbird wrote:
> Why doesn't python's list append() method return the list itself? For
> that matter, even the reverse() and sort() methods?
> I found this link (http://code.google.com/edu/languages/google-python-
> class/lists.html) which suggests that this is done to mak
Do list(reversed(list(reversed([1, 2, 3, 4])) + [[]]))
Though TBH sometimes get annoyed at this behavior myself. There are a lot
of people who are very vocal in support of returning none, and it makes
sense in some ways. Since reversed returns an iterator though, it makes
this code horrible and
On 07/11/2010 07:44 AM, rantingrick wrote:
> On Jul 10, 10:59 pm, Luke Kenneth Casson Leighton
> wrote:
>> source at:http://github.com/lkcl/grailbrowser
>>
>> $ python grail.py (note the lack of "python1.5" or "python2.4")
>>
>> conversion of the 80 or so regex's to re has been carried out.
>> ent
On 11 jul, 13:28, Johan Grönqvist wrote:
> 2010-07-11 02:12, Ritchy lelis skrev:
>
> > On 7 jul, 08:38, Johan Grönqvist wrote:
>
> > About the plot draw it's a curve that it's a set of points wich it's
> > the result of the comput of the Vref and Vi together. I don't know if
> > i had to make a b
On 07/11/2010 06:28 PM, Nathan Rice wrote:
> Do list(reversed(list(reversed([1, 2, 3, 4])) + [[]]))
>
> Though TBH sometimes get annoyed at this behavior myself. There are a
> lot of people who are very vocal in support of returning none, and it
> makes sense in some ways. Since reversed returns
I have a complex object with attributes that contain lists, sets,
dictionaries, and other objects. The lists and dictionaries may
themselves contain complex objects.
I would like to provide a read-only version of this type of
object for other developers to query for reporting.
Is there a way to p
On 7/11/10 9:31 AM, Thomas Jollans wrote:
> Cross platform file manager. Hmm. Does "cross platform" involve UNIX and
> something that isn't UNIX, say, Windows?
> Erm, no. No, no, no. It won't work. Well, it would work, but it wouldn't
> be any good. The UNIX and Windows concepts of "file system" ar
On Sun, 11 Jul 2010 08:59:06 -0700 (PDT)
dhruvbird wrote:
> Why doesn't python's list append() method return the list itself? For
> that matter, even the reverse() and sort() methods?
> I found this link (http://code.google.com/edu/languages/google-python-
> class/lists.html) which suggests that t
rantingrick wrote:
Another source of asininity seems to be the naming conventions of the
Python language proper! True/False start with an upper case and i
applaud this. However str, list, tuple, int, float --need i go
on...?-- start with lowercase.
Q: Well what the hell is your problem Rick. Who
Thomas Jollans wrote:
On 07/11/2010 05:59 PM, dhruvbird wrote:
Why doesn't python's list append() method return the list itself? For
that matter, even the reverse() and sort() methods?
I found this link (http://code.google.com/edu/languages/google-python-
class/lists.html) which suggests that th
I'm an old Perl-hacker, and am trying to Dive in Python. I have some
easy issues (Python 2.6)
which probably can be answered in two seconds:
1. Why is it that I cannot use print in booleans?? e.g.:
>>> True and print "It is true!"
I found a nice work-around using eval(compile(.,"","exec"))
On 07/11/2010 07:48 PM, wheres pythonmonks wrote:
> I'm an old Perl-hacker, and am trying to Dive in Python. I have some
> easy issues (Python 2.6)
> which probably can be answered in two seconds:
>
> 1. Why is it that I cannot use print in booleans?? e.g.:
True and print "It is true!"
pr
On Jul 11, 9:19 pm, Thomas Jollans wrote:
> On 07/11/2010 05:59 PM, dhruvbird wrote:
>
> > Why doesn't python's list append() method return the list itself? For
> > that matter, even the reverse() and sort() methods?
> > I found this link (http://code.google.com/edu/languages/google-python-
> > cl
On 07/11/2010 11:48 AM, wheres pythonmonks wrote:
> I'm an old Perl-hacker, and am trying to Dive in Python. I have some
> easy issues (Python 2.6)
> which probably can be answered in two seconds:
>
> 1. Why is it that I cannot use print in booleans?? e.g.:
True and print "It is true!"
Th
wheres pythonmonks wrote:
> I'm an old Perl-hacker, and am trying to Dive in Python. I have some
> easy issues (Python 2.6)
> which probably can be answered in two seconds:
>
> 1. Why is it that I cannot use print in booleans?? e.g.:
True and print "It is true!"
>
> I found a nice work-
On Jul 11, 6:38 am, rantingrick wrote:
> Seems kinda dumb to build a tuple just so a conditional wont blow
> chunks! This integer bool-ing need to be fixed right away!
Okay. What fix do you propose? Would your fix maintain the identity
"0 == False"? For bonus points, explain how you'd deal with
On 7/11/10 10:48 AM, wheres pythonmonks wrote:
> I'm an old Perl-hacker, and am trying to Dive in Python. I have some
> easy issues (Python 2.6)
> which probably can be answered in two seconds:
>
> 1. Why is it that I cannot use print in booleans?? e.g.:
True and print "It is true!"
Becau
Thanks for your answers -- it is much appreciated.
On #1: I had very often used chained logic with both logging and
functional purposes in Perl, and wanted to duplicate this in Python.
"It reads like english" Using the print_ print wrapper works for me.
Follow-up:
Is there a way to define compi
On 7/11/10 11:45 AM, wheres pythonmonks wrote:
> Follow-up:
> Is there a way to define compile-time constants in python and have the
> bytecode compiler optimize away expressions like:
>
> if is_my_extra_debugging_on: print ...
>
> when "is_my_extra_debugging" is set to false? I'd like to pay no
On 07/11/2010 08:45 PM, wheres pythonmonks wrote:
> Thanks for your answers -- it is much appreciated.
>
> On #1: I had very often used chained logic with both logging and
> functional purposes in Perl, and wanted to duplicate this in Python.
> "It reads like english" Using the print_ print wrap
* Stephen Hansen, on 11.07.2010 21:00:
On 7/11/10 11:45 AM, wheres pythonmonks wrote:
Follow-up:
Is there a way to define compile-time constants in python and have the
bytecode compiler optimize away expressions like:
if is_my_extra_debugging_on: print ...
when "is_my_extra_debugging" is set t
I have been going round and round trying to configure python 2.6
running on osx 10.6.x to work with mySQL 5.1.44.
Python seems to work ... i have an installation of mysql 5.1.44
running and have used it in conjunction for other php/apache projects.
I want to learn python and think i need a better
Thomas Jollans writes:
> On 07/11/2010 07:44 AM, rantingrick wrote:
>> On Jul 10, 10:59 pm, Luke Kenneth Casson Leighton
>> wrote:
>>> source at:http://github.com/lkcl/grailbrowser
>>>
>>> $ python grail.py (note the lack of "python1.5" or "python2.4")
>>>
>>> conversion of the 80 or so regex's
On Jul 11, 10:48 am, wheres pythonmonks
wrote:
> I'm an old Perl-hacker, and am trying to Dive in Python.
Welcome to the light.
> I have some
> easy issues (Python 2.6)
> which probably can be answered in two seconds:
>
> 1. Why is it that I cannot use print in booleans?? e.g.:
>
> >>> True a
On Jul 11, 11:45 am, wheres pythonmonks
wrote:
> On #4: So there are some hacks, but not something as easy as "import
> unimportable" or an @noexport decorator. The underscore works, so
> does "del".
Careful. If you have a module that looks like this:
def foo():
bar()
def bar():
pri
Carl Banks wrote:
> On Jul 11, 10:48 am, wheres pythonmonks
> wrote:
>> I'm an old Perl-hacker, and am trying to Dive in Python.
>
> Welcome to the light.
>
>
>> I have some
>> easy issues (Python 2.6)
>> which probably can be answered in two seconds:
>>
>> 1. Why is it that I cannot use prin
On Sun, Jul 11, 2010 at 2:08 PM, News123 wrote:
> Carl Banks wrote:
>> On Jul 11, 10:48 am, wheres pythonmonks
>> wrote:
>>> I'm an old Perl-hacker, and am trying to Dive in Python.
>>
>> Welcome to the light.
>>
>>
>>> I have some
>>> easy issues (Python 2.6)
>>> which probably can be answered
Chris Rebert wrote:
> On Sun, Jul 11, 2010 at 2:08 PM, News123 wrote:
>> Carl Banks wrote:
>>> On Jul 11, 10:48 am, wheres pythonmonks
>>> wrote:
I'm an old Perl-hacker, and am trying to Dive in Python.
>>> Welcome to the light.
>>>
>>>
I have some
easy issues (Python 2.6)
wh
On Sun, Jul 11, 2010 at 9:51 AM, wrote:
> I have a complex object with attributes that contain lists, sets,
> dictionaries, and other objects. The lists and dictionaries may themselves
> contain complex objects.
>
> I would like to provide a read-only version of this type of object for other
> de
You could probably:
cd to dir1
getcwd
cd to dir2
getcwd
repeat
cd ..
getcwd
if getcwd == dir1's cwd, then under
until at /
cd to dir1
repeat
cd ..
getcwd
if getcwd == dir2's cwd, then under
until at /
This should deal with symlinks and junctions, as long as you aren't worried
On Jul 11, 5:16 pm, rantingrick wrote:
> On Jul 11, 9:01 am, a...@pythoncraft.com (Aahz) wrote:
>
> > As usual, you would rather tell other people what to do instead of doing
> > any work yourself.
>
> Dear God! My statement was intended to fetch responses like...
>
> "Hey, that sounds like a gr
Alf P. Steinbach /Usenet wrote:
* Stephen Hansen, on 11.07.2010 21:00:
On 7/11/10 11:45 AM, wheres pythonmonks wrote:
Follow-up:
Is there a way to define compile-time constants in python and have the
bytecode compiler optimize away expressions like:
if is_my_extra_debugging_on: print ...
when
On Jul 11, 12:23 pm, MRAB wrote:
> If you're so unhappy with Python, why don't you create your own
> language. I suggest the name "Rantthon".
Ah yes, then i can finally assume my worthy title of the "Ranting
Dictator For Life"! ;-)
--
http://mail.python.org/mailman/listinfo/python-list
On 07/11/10 04:59, Luke Kenneth Casson Leighton wrote:
source at:
http://github.com/lkcl/grailbrowser
$ python grail.py (note the lack of "python1.5" or "python2.4")
conversion of the 80 or so regex's to re has been carried out.
entirely successfully or not is a matter yet to be determined. al
John Bokma wrote:
Thomas Jollans writes:
On 07/11/2010 07:44 AM, rantingrick wrote:
On Jul 10, 10:59 pm, Luke Kenneth Casson Leighton
wrote:
source at:http://github.com/lkcl/grailbrowser
$ python grail.py (note the lack of "python1.5" or "python2.4")
conversion of the 80 or so regex's to
On Jul 11, 1:19 pm, Mark Dickinson wrote:
> Okay. What fix do you propose? Would your fix maintain the identity
> "0 == False"?
No because all integers should bool True. An integer is a value that
IS NOT empty and IS NOT None. Therefore the only logical way to handle
integer bool-ing is to say
On Jul 11, 11:31 am, Thomas Jollans wrote:
> On 07/11/2010 07:44 AM, rantingrick wrote:
> > Congratulations on this effort Luke. However you know what project i
> > would really like to see the community get around? ...dramatic pause
> > here... a cross platform Python file browser!
>
> Cross pla
On Sun, Jul 11, 2010 at 7:22 PM, rantingrick wrote:
> On Jul 11, 1:19 pm, Mark Dickinson wrote:
>
>> Okay. What fix do you propose? Would your fix maintain the identity
>> "0 == False"?
>
> No because all integers should bool True. An integer is a value that
> IS NOT empty and IS NOT None. Ther
On Jul 11, 11:57 am, Stephen Hansen wrote:
> On 7/11/10 9:31 AM, Thomas Jollans wrote:
> > trying to
> > support both UNIX and Windows is NOT a good idea.
>
> And you can't lump the Mac in with "UNIX" here, even though it really is
> UNIX at the foundation, because there's some very fundamental
>
On Sat, 10 Jul 2010 23:50:05 -0700, rantingrick wrote:
> You do realize that
> Python must build a tuple for ever conditional that uses this semantic?
> This is more bad, bad, bad than integer bool-ing! My bin packer could
> potentially compute millions of parts. I do not want to waste valuable
>
On Sun, 11 Jul 2010 01:30:36 -0700, rantingrick wrote:
> On Jul 11, 3:03 am, "Günther Dietrich" wrote:
>
>> So, it is not a disadvantage that the functions you listed above are
>> named in this way. In the contrary, it is an advantage, as it keeps
>> newcomers from using stupid variable names.
>
On Sun, 11 Jul 2010 00:26:36 -0700, rantingrick wrote:
> Another source of asininity seems to be the naming conventions of the
> Python language proper! True/False start with an upper case and i
> applaud this. However str, list, tuple, int, float --need i go on...?--
> start with lowercase.
>
>
On 12/07/2010 01:02, Steven D'Aprano wrote:
On Sat, 10 Jul 2010 23:50:05 -0700, rantingrick wrote:
You do realize that
Python must build a tuple for ever conditional that uses this semantic?
This is more bad, bad, bad than integer bool-ing! My bin packer could
potentially compute millions of pa
On Sun, 11 Jul 2010 18:31:39 +0200, Thomas Jollans wrote:
> Cross platform file manager. Hmm. Does "cross platform" involve UNIX and
> something that isn't UNIX, say, Windows? Erm, no. No, no, no. It won't
> work. Well, it would work, but it wouldn't be any good. The UNIX and
> Windows concepts of
On Jul 11, 5:28 pm, Fuzzyman wrote:
> But why hijack someone else's announcement to do that? Congratulations
> alone would have been great. However good your intentions your message
> came across as "but it would really have been better if you had been
> doing something else instead...".
Micheal
On Sun, 11 Jul 2010 16:22:41 -0700, rantingrick wrote:
> On Jul 11, 1:19 pm, Mark Dickinson wrote:
>
>> Okay. What fix do you propose? Would your fix maintain the identity
>> "0 == False"?
>
> No because all integers should bool True. An integer is a value that IS
> NOT empty
Integers aren'
On Sun, 11 Jul 2010 08:59:06 -0700, dhruvbird wrote:
> Why doesn't python's list append() method return the list itself? For
> that matter, even the reverse() and sort() methods? I found this link
> (http://code.google.com/edu/languages/google-python- class/lists.html)
> which suggests that this i
On 7/11/10 5:01 PM, rantingrick wrote:
> On Jul 11, 11:57 am, Stephen Hansen wrote:
>> On 7/11/10 9:31 AM, Thomas Jollans wrote:
>>> trying to
>>> support both UNIX and Windows is NOT a good idea.
>>
>> And you can't lump the Mac in with "UNIX" here, even though it really is
>> UNIX at the foundat
On 12/07/2010 01:06, Steven D'Aprano wrote:
On Sun, 11 Jul 2010 00:26:36 -0700, rantingrick wrote:
Another source of asininity seems to be the naming conventions of the
Python language proper! True/False start with an upper case and i
applaud this. However str, list, tuple, int, float --need i
dhruvbird wrote:
>
> On a side note, is there any other way to append to a list using
> slices (apart from the one below):
> x[len(x):len(x)] = [item to append]
dy you mean
x.extend([1,2,3])
?
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 11, 7:02 pm, Steven D'Aprano wrote:
> Come back when you have profiled your code and
> can prove that the cost of building empty tuples is an actual bottleneck.
Did you even read this thread, i mean from head to tail. I NEVER said
building EMPTY tuples was the cause of my rant. My complai
On Jul 11, 7:18 pm, Mark Lawrence wrote:
> +1
Oh mark grow a spine already, really. I can't help but thinking of the
spineless Robert Ford every time you open your mouth.
--
http://mail.python.org/mailman/listinfo/python-list
I get sometimes a
Errno 9 Bad file descriptor
the code is too long to show it here but what are the circumstances
this could happen? A web search showed nothing.
I have especially the feeling Python 2.6 has some problems with
Unicode ... and might not find the file. Is that possible?
--
http://
On Jul 11, 7:23 pm, Steven D'Aprano wrote:
> On Sun, 11 Jul 2010 16:22:41 -0700, rantingrick wrote:
> > On Jul 11, 1:19 pm, Mark Dickinson wrote:
>
> >> Okay. What fix do you propose? Would your fix maintain the identity
> >> "0 == False"?
>
> > No because all integers should bool True. An inte
Hello,
After reading 'Practical Django Projects' I decided that I want to
implement the VirtualEnv tip suggested in order to properly segregate
code/modules in different projects. I am however having problems with
my django installations not using site-packages within the virtualenv
but rather att
On Jul 11, 8:59 am, dhruvbird wrote:
> Why doesn't python's list append() method return the list itself? For
> that matter, even the reverse() and sort() methods?
Because Guido thinks that having those methods return None is the best
way to communicate that the underlying object has been mutated
On Jul 11, 7:31 pm, Stephen Hansen wrote:
You said about macs...
> Copying a file without the resource fork on a mac, *can* result in
> essential data being lost (This is less common then it used to be). As
> simple a task as chown/chmod for posix systems to take ownership of a
> file and make it
* MRAB, on 12.07.2010 00:37:
Alf P. Steinbach /Usenet wrote:
* Stephen Hansen, on 11.07.2010 21:00:
On 7/11/10 11:45 AM, wheres pythonmonks wrote:
Follow-up:
Is there a way to define compile-time constants in python and have the
bytecode compiler optimize away expressions like:
if is_my_extra
On 7/11/10 5:51 PM, rantingrick wrote:
> On Jul 11, 7:23 pm, Steven D'Aprano cybersource.com.au> wrote:
>> On Sun, 11 Jul 2010 16:22:41 -0700, rantingrick wrote:
>>> On Jul 11, 1:19 pm, Mark Dickinson wrote:
>>
Okay. What fix do you propose? Would your fix maintain the identity
"0 ==
"i had once considered you one of the foremost intelligent minds
within this group. However, after your display within this thread i am
beginning to doubt my original beliefs of you."
"Oh ... grow a spine already, really. I can't help but thinking of the
spineless Robert Ford every time you open y
On 7/11/10 6:10 PM, rantingrick wrote:
> On Jul 11, 7:31 pm, Stephen Hansen wrote:
>
> You said about macs...
>> Copying a file without the resource fork on a mac, *can* result in
>> essential data being lost (This is less common then it used to be). As
>> simple a task as chown/chmod for posix s
On 7/11/10 6:12 PM, Alf P. Steinbach /Usenet wrote:
> However, as stated up-thread, I do not expect facts, logic or general
> reasoning to have any effect whatsoever on such hard-core religious
> beliefs.
Grow up, and/or get a grip, and/or get over yourself.
Everyone who disagreed with you, disa
Alf P. Steinbach /Usenet wrote:
* MRAB, on 12.07.2010 00:37:
Alf P. Steinbach /Usenet wrote:
* Stephen Hansen, on 11.07.2010 21:00:
On 7/11/10 11:45 AM, wheres pythonmonks wrote:
Follow-up:
Is there a way to define compile-time constants in python and have the
bytecode compiler optimize away
On Sun, 11 Jul 2010 17:35:18 -0700, rantingrick wrote:
> On Jul 11, 7:02 pm, Steven D'Aprano cybersource.com.au> wrote:
>
>> Come back when you have profiled your code and can prove that the cost
>> of building empty tuples is an actual bottleneck.
>
> Did you even read this thread, i mean from
Heya,
I'm running a py script that simply grabs an image, creates a
thumbnail and uploads it to s3. I'm simply logging into ssh and
running the script through Terminal. It works fine, but gives me an
IOError every now and then.
I was wondering if I can catch this error and just get the script to
* Stephen Hansen, on 12.07.2010 04:02:
On 7/11/10 6:12 PM, Alf P. Steinbach /Usenet wrote:
However, as stated up-thread, I do not expect facts, logic or general
reasoning to have any effect whatsoever on such hard-core religious
beliefs.
Grow up, and/or get a grip, and/or get over yourself.
E
On Sun, Jul 11, 2010 at 7:15 PM, The Danny Bos wrote:
> Heya,
>
> I'm running a py script that simply grabs an image, creates a
> thumbnail and uploads it to s3. I'm simply logging into ssh and
> running the script through Terminal. It works fine, but gives me an
> IOError every now and then.
>
>
1 - 100 of 126 matches
Mail list logo