Yes, Dan is right, it looked for the sources, and you have only binaries on
your system. Look in your distribution repositories for the *-devel or alike
for the 5 that failed and try again.
2011/4/19 Dan Stromberg
> On Tue, Apr 19, 2011 at 7:55 AM, Rob McGillivray
> wrote:
> > Hi All,
> >
> > I
On Tue, Apr 19, 2011 at 7:55 AM, Rob McGillivray
wrote:
> Hi All,
>
> I'm new to Python, and trying to get python 3.2 installed on Centos 5.6. When
> I run 'make test', I receive several errors. The readme states that you can
> generally ignore messages about skipped tests, but as you can see be
On 4/19/2011 1:33 PM, Rob McGillivray wrote:
I am trying to install from an RPM downloaded from python.org.
That puzzles me. For *nix, I do not see .rpm, just tarballs, on
http://python.org/download/releases/3.2/
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list
Reedy
Sent: Tuesday, April 19, 2011 12:59 PM
To: python-list@python.org
Subject: 3.2 test failures on Centos 5.6 (was Re: Noob Question)
On 4/19/2011 10:55 AM, Rob McGillivray wrote:
> I'm new to Python, and trying to get python 3.2 installed on Centos
> 5.6. When I run 'mak
On 4/19/2011 10:55 AM, Rob McGillivray wrote:
I'm new to Python, and trying to get python 3.2 installed on Centos
5.6. When I run 'make test', I receive several errors.
Welcome to Python.
Newbie lesson 1: write an informative subject line that will catch the
attention of people who can answe
Franck Ditter writes:
> Pardon my noobness (?) but why is there a 2.x and 3.x development
> teams working concurrently in Python ?
Well, Python 2.7 is the last major 2.x release, only bugfixes are done
for it, like the 2.7.1 release. Actual developement is in the 3.x
branch now.
> Which one sh
On Sun, Nov 14, 2010 at 1:03 AM, Franck Ditter wrote:
> Pardon my noobness (?) but why is there a 2.x and 3.x development
> teams working concurrently in Python ? I hardly saw that in other
> languages. Which one should I choose to start with, to cope with
> the future ? Isn't 3.x supposed to ext
On Sun, Nov 14, 2010 at 1:03 AM, Franck Ditter wrote:
> Pardon my noobness (?) but why is there a 2.x and 3.x development
> teams working concurrently in Python ? I hardly saw that in other
> languages.
You haven't heard of the infamous Perl 6?
> Which one should I choose to start with, to cope
nanoe...@gmail.com a écrit :
Hello?
Hi.
Ok, first, this is mostly OT here - your question should have gone to
either the project's maintainer or any Ubuntu forum /
mailing-list/whatever.
I'm currently installed Ubuntu 8.10. I'm not a Linux person, so I
don't know a lot about it. The rea
2009/1/3 Russ P. :
> So unless you think the standard library will someday include code for
> air traffic management, I'll stick with camelCase, and I'll thank you
> for not making an issue of it.
Another late comment, sorry, but as an air traffic management safety
consultant, I'm quite intereste
On Sat, 17 Jan 2009 06:09:29 -0800, Aahz wrote:
> You are missing the point: suppose you write a useful library in your
> air traffic management application, maybe one that does a good job of
> handling user input. If you have done a proper job of abstracting it
> from your application as a whole
[following up late]
In article <2b3c916e-6908-4b12-933f-8f7bfa86c...@i20g2000prf.googlegroups.com>,
Russ P. wrote:
>
>Fair enough, but for code that is not intended for general public
>usage (i.e., most code) so-called camelCase is every bit as good if
>not better than using underscores to divide
"Gabriel Genellina" writes:
> En Mon, 05 Jan 2009 02:03:26 -0200, Roy Smith escribió:
>
>
>> The other day, I came upon this gem. It's a bit of perl embedded in a
>> Makefile; this makes it even more gnarly because all the $'s get
>> doubled to
>> hide them from make:
>>
>> define absmondir
>>
> Anyone have something to say about the userio stuff?
(If you're going to post something about my coding style, I invite you
to do something infinitely more useful:
write crapToPep8.py {or is it crap_to_pep8?} to satisfy your sick
fetish for consistency.)
--
http://mail.python.org/mailman/listinf
En Mon, 05 Jan 2009 02:03:26 -0200, Roy Smith escribió:
The other day, I came upon this gem. It's a bit of perl embedded in a
Makefile; this makes it even more gnarly because all the $'s get doubled
to
hide them from make:
define absmondir
$(shell perl -e ' \
On Mon, Jan 5, 2009 at 1:47 PM, sprad wrote:
> On Jan 3, 6:41 pm, Steven D'Aprano cybersource.com.au> wrote:
>> The OP comes from a Perl background, which AFAIK allows you to concat
>> numbers to strings and add strings to numbers. That's probably the (mis)
>> feature he was hoping Python had.
I
In article
,
sprad wrote:
> On Jan 3, 6:41 pm, Steven D'Aprano cybersource.com.au> wrote:
> > The OP comes from a Perl background, which AFAIK allows you to concat
> > numbers to strings and add strings to numbers. That's probably the (mis)
> > feature he was hoping Python had.
>
> That's cor
On Jan 3, 6:41 pm, Steven D'Aprano wrote:
> The OP comes from a Perl background, which AFAIK allows you to concat
> numbers to strings and add strings to numbers. That's probably the (mis)
> feature he was hoping Python had.
That's correct -- and that's been one of the more difficult parts of
my
My gmail did that. FYI, it wasn't intentional.
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
Paula Poundstone - "I don't have a bank account because I don't know my
mother's maiden name."
On Sun, Jan 4, 2009 at
On Sat, 03 Jan 2009 16:19:58 +0100, Bruno Desthuilliers wrote:
> But indeed, you obviously cannot add strings with numerics nor
> concatenate numerics with strings. This would make no sense.
The OP comes from a Perl background, which AFAIK allows you to concat
numbers to strings and add strings
On Sat, 03 Jan 2009 20:35:25 +, alex goretoy wrote:
> for each his own.
Please don't top-post.
Please don't quote the ENTIRE body of text (PLUS doubling it by including
a completely useless HTML version) just to add a trivial comment. Trim
the text you are replying to.
> Any more word on
> Any more word on userio?
None yet, I'm afraid. Should've started a different thread for it -
but it's stuck here (in obscurity) forever xd.
--
http://mail.python.org/mailman/listinfo/python-list
for each his own.
Any more word on userio?
On Sat, Jan 3, 2009 at 6:14 PM, Russ P. wrote:
> On Jan 2, 10:50 pm, Ben Finney
>
> >
> wrote:
> > s0s...@gmail.com writes:
> > > On Jan 2, 7:20 pm, Ben Finney
> > >
> >
> > > wrote:
> > > > They don't need to be creative; they merely need to confo
On Jan 2, 10:50 pm, Ben Finney
wrote:
> s0s...@gmail.com writes:
> > On Jan 2, 7:20 pm, Ben Finney
> > wrote:
> > > They don't need to be creative; they merely need to conform with
> > > the naming scheme as laid out in the PEP.
>
> > If it's something to be included in the standard library, I ag
sprad a écrit :
I've done a good bit of Perl, but I'm new to Python.
I find myself doing a lot of typecasting (or whatever this thing I'm
about to show you is called),
Actually, it's just plain object instanciation.
and I'm wondering if it's normal, or if
I'm missing an important idiom.
For
> Unless you explicitly *never* intend sharing your code with *anyone*,
> it's best to code all your Python code in accordance with PEP 8 anyway.
Well said. Let's bury the puppy already.
Anyone have something to say about the userio stuff?
--
http://mail.python.org/mailman/listinfo/python-list
s0s...@gmail.com writes:
> On Jan 2, 7:20 pm, Ben Finney
> wrote:
> > They don't need to be creative; they merely need to conform with
> > the naming scheme as laid out in the PEP.
>
> If it's something to be included in the standard library, I agree
> (just for consistency, not because using_un
> etc etc ... IOW consider not biting off more than you can chew.
It's possible that I am, but where's the fun without the risk?
Good thinking in your post though!
I will add "get_date" at some point, and I've modified "get_numeric"
already.
All-right, the moment you've all been waiting for:
---
On Jan 2, 6:15 pm, s0s...@gmail.com wrote:
> On Jan 2, 7:20 pm, Ben Finney
> wrote:
>
> > vk writes:
> > > > If there were, I would expect it to conform with PEP 8 (get those
> > > > ugly camelCase names outta there :-)
>
> > > haha, please forgive me.
> > > I'll try and think of some more creati
On Fri, 02 Jan 2009 21:02:19 -0500, Steve Holden wrote:
> Ben Finney wrote:
>> vk writes:
>>
If there were, I would expect it to conform with PEP 8 (get those
ugly camelCase names outta there :-)
>>> haha, please forgive me.
>>> I'll try and think of some more creative names.
>>
>> Th
On Jan 2, 6:57 pm, Andreas Waldenburger wrote:
[snip]
> You even assumed that distinction in your example:
>
> > >>> 'hello world".title()
[snip]
sorry, here is TitleCase.py_b2
py> 'hello world'.title().replace(' ', '')
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 2, 7:20 pm, Ben Finney
wrote:
> vk writes:
> > > If there were, I would expect it to conform with PEP 8 (get those
> > > ugly camelCase names outta there :-)
>
> > haha, please forgive me.
> > I'll try and think of some more creative names.
>
> They don't need to be creative; they merely n
Ben Finney wrote:
> vk writes:
>
>>> If there were, I would expect it to conform with PEP 8 (get those
>>> ugly camelCase names outta there :-)
>> haha, please forgive me.
>> I'll try and think of some more creative names.
>
> They don't need to be creative; they merely need to conform with the
vk writes:
> > If there were, I would expect it to conform with PEP 8 (get those
> > ugly camelCase names outta there :-)
>
> haha, please forgive me.
> I'll try and think of some more creative names.
They don't need to be creative; they merely need to conform with the
naming scheme as laid out
On Jan 3, 11:16 am, vk wrote:
> > If there were, I would expect it to conform with PEP 8 (get those ugly
> > camelCase names outta there :-)
>
> haha, please forgive me.
> I'll try and think of some more creative names.
>
> atm, I've got a chem final to study for.
> I'll probably post something re
On Fri, 2 Jan 2009 16:44:11 -0800 (PST) r wrote:
> On Jan 2, 6:26 pm, Andreas Waldenburger wrote:
> > On Fri, 2 Jan 2009 16:16:10 -0800 (PST) vk wrote:
> >
> > > > If there were, I would expect it to conform with PEP 8 (get
> > > > those ugly camelCase names outta there :-)
> >
> > > haha, pl
On Jan 2, 6:26 pm, Andreas Waldenburger wrote:
> On Fri, 2 Jan 2009 16:16:10 -0800 (PST) vk wrote:
>
> > > If there were, I would expect it to conform with PEP 8 (get those
> > > ugly camelCase names outta there :-)
>
> > haha, please forgive me.
> > I'll try and think of some more creative nam
On Fri, 2 Jan 2009 16:16:10 -0800 (PST) vk wrote:
> > If there were, I would expect it to conform with PEP 8 (get those
> > ugly camelCase names outta there :-)
>
> haha, please forgive me.
> I'll try and think of some more creative names.
FYI: The names themselves aren't he problem at all. T
> If there were, I would expect it to conform with PEP 8 (get those ugly
> camelCase names outta there :-)
haha, please forgive me.
I'll try and think of some more creative names.
atm, I've got a chem final to study for.
I'll probably post something resembling useful code tomorrow morning.
until
vk writes:
> There needs to be a "user_io" or "sanitize" module in the standard
> library to take care of this stuff.
> Like:
>
> import userio
>
> logic = userio.userio()
>
> number = logic.getNumeric("blah: ") # will offer the user a "re-do" in
> case of bad input
> number = logic.forceGetNu
> There needs to be a "user_io" or "sanitize" module in the standard
> library to take care of this stuff.
[snip]
+1
You are sooo right. You know, it is easy to forget about such things
after you learn a language, i have written my own input logic, but i
remember my __init__ days with python now a
On Fri, 2 Jan 2009 14:36:04 -0800 (PST) vk wrote:
> There needs to be a "user_io" or "sanitize" module in the standard
> library to take care of this stuff.
> [snip example]
>
Great idea! +1
> ... but there isn't, as far as I know.
Well, get to it, then. ;)
/W
--
My real email address is co
> You might better do
>
> bet = int(raw_input("Enter your bet"))
>
> because then you don't need to later on convert bet again and again.
This is all fine until you give it to an end-user.
This is what I picture:
$ ./script.py
Enter your bet: $10
.. or perhaps "ten", "all", or a jillion other ta
You can use the built-in string formatting options and operations.
2.5: http://www.python.org/doc/2.5.2/lib/typesseq-strings.html
2.6: http://docs.python.org/library/string.html
In essence, you can do:
print "You still have $%i remaining" %(money)
On Jan 2, 2:15 pm, sprad wrote:
> I've done a g
sprad schrieb:
I've done a good bit of Perl, but I'm new to Python.
I find myself doing a lot of typecasting (or whatever this thing I'm
about to show you is called), and I'm wondering if it's normal, or if
I'm missing an important idiom.
It is normal, although below you make things needlessly
On Fri, Jan 2, 2009 at 4:15 PM, sprad wrote:
> I've done a good bit of Perl, but I'm new to Python.
>
> I find myself doing a lot of typecasting (or whatever this thing I'm
> about to show you is called), and I'm wondering if it's normal, or if
> I'm missing an important idiom.
>
> For example:
>
On 6 juin, 19:36, रवींदर ठाकुर (ravinder thakur)
<[EMAIL PROTECTED]> wrote:
> hello friends,
>
> i have a python library(rdflib) that i am using in some project using
> Google App Engine. I have developed everything using this on my local
> machine and things work fine. But in my final deployment,
On Jan 7, 12:09 am, GHZ <[EMAIL PROTECTED]> wrote:
> Had the same issue. What you want is: reload()
Thanks :)
--
http://mail.python.org/mailman/listinfo/python-list
Had the same issue. What you want is: reload()
--
http://mail.python.org/mailman/listinfo/python-list
CarlP a écrit :
> How do I run a Python script.
usually, it's:
$ python /path/to/somescript.py arg1 argN
on a command line prompt.
> I have one that gmail loader needs to
> run on my email box. Here's the script
>
> http://www.marklyon.org/gmail/cleanmbox.py
>
> I can't seem to find what I ne
> I installed python, run the interpreter and the script...
Are you trying to run the script from the interpreter? You _can_ run
scripts from the interpreter, but it isn't as simple as typing the
name of the script. To me, that is what it sounds like you are trying
to do. I don't know what environ
On Jun 28, 12:17 pm, CarlP <[EMAIL PROTECTED]> wrote:
> How do I run a Python script. I have one that gmail loader needs to
> run on my email box. Here's the script
>
> http://www.marklyon.org/gmail/cleanmbox.py
>
> I can't seem to find what I need to run it. I installed python, run
> the interpret
On 23 Sty, 10:59, [EMAIL PROTECTED] wrote:
> Hello everyone!
> I have a piece of code that looks like this:
>
> if len(BuildList) > 0:
> print "The script found %d game directories:" % len(BuildList)
> print
> num = 0
> for i in BuildList:
> print str(num) +" " + i
>
Ah, thank you for the respone!
I have not gotten around to test it yet, but I hope it will work! :)
-Daniel
2007-01-23 10:59:37
[EMAIL PROTECTED] wrote in message
<[EMAIL PROTECTED]>
> Hello everyone!
> I have a piece of code that looks like this:
>
> if len(BuildList) > 0:
> print "The sc
[EMAIL PROTECTED] writes:
> print "Select a build number from 0 to " + str(len(BuildList) - 1)
> buildNum = int(raw_input('Select build #> '))
>
> while buildNum > (len(BuildList) -1) or buildNum <= -1:
> print
> print "Error: Invalid build number!"
> print "Sel
> I have a piece of code that looks like this:
>
> if len(BuildList) > 0:
> print "The script found %d game directories:" % len(BuildList)
> print
> num = 0
> for i in BuildList:
> print str(num) +" " + i
> num = num + 1
> print
> print "Select a build
http://code.google.com/hosting/
xandeer wrote:
> where is a good open-source project website?
> thank-you
> (sorry for being so annoying)(if I'm annoying)(if not then I'm not
> sorry)
--
http://mail.python.org/mailman/listinfo/python-list
xandeer wrote:
> where is a good open-source project website?
> thank-you
> (sorry for being so annoying)(if I'm annoying)(if not then I'm not
> sorry)
>
sourceforge.net
--
http://mail.python.org/mailman/listinfo/python-list
"zefciu" wrote in message news:[EMAIL PROTECTED]
> Where can I find a good explanation when does an interpreter copy the
> value, and when does it create the reference. I thought I understand
> it, but I have just typed in following commands:
>
> >>> a=[[1,2],[3,4]]
> >>> b=a[1]
> >>> b=[5,6]
> >>
zefciu wrote:
> Hello!
>
> Where can I find a good explanation when does an interpreter copy the
> value, and when does it create the reference.
Unless you explicitely ask for a copy (either using the copy module or a
specific function or method), you'll get a reference.
> I thought I understan
zefciu wrote:
> Hello!
>
> Where can I find a good explanation when does an interpreter copy the
> value, and when does it create the reference. I thought I understand
> it, but I have just typed in following commands:
>
>
a=[[1,2],[3,4]]
b=a[1]
b=[5,6]
a
>
> [[1, 2], [3, 4]]
>
zefciu wrote:
> Hello!
>
> Where can I find a good explanation when does an interpreter copy the
> value, and when does it create the reference. I thought I understand
> it, but I have just typed in following commands:
>
a=[[1,2],[3,4]]
b=a[1]
b=[5,6]
a
> [[1, 2], [3, 4]]
>>>
And thank you gentlemen for turning my somewhat banale question into a
worthwhile discussion. :-)
I shall not forget self ever again!
--
http://mail.python.org/mailman/listinfo/python-list
Edward Elliott wrote:
> bruno at modulix wrote:
>
>>Edward Elliott wrote:
>>
>>>Ah, well then, there's no need for a full-blown parser. It should
>>>suffice to recognize a class definition and modify the parameter list of
>>>every def indented one level further than that.
>>
>>won't do :
>>
>>cla
bruno at modulix wrote:
> Edward Elliott wrote:
>> Ah, well then, there's no need for a full-blown parser. It should
>> suffice to recognize a class definition and modify the parameter list of
>> every def indented one level further than that.
>
> won't do :
>
> class CounterExample(object):
>
Edward Elliott wrote:
> Ben Finney wrote:
>
>>As I understand it, the point was not what the code does, but to give
>>a sample input (a Python program) for the "simple text processor" you
>>described to wade through.
>
>
> Ah, well then, there's no need for a full-blown parser. It should suffic
Ben Finney wrote:
> Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
>
>
>>Ben Finney a écrit :
>>
>>>So now you're proposing that this be a special case when a
>>>function is declared by that particular syntax, and it should be
>>>different to when a function is created outside the class
>>>defin
Ben Finney wrote:
> As I understand it, the point was not what the code does, but to give
> a sample input (a Python program) for the "simple text processor" you
> described to wade through.
Ah, well then, there's no need for a full-blown parser. It should suffice
to recognize a class definition
Edward Elliott <[EMAIL PROTECTED]> writes:
> Marc 'BlackJack' Rintsch wrote:
> > Edward Elliott wrote:
> >> I can prove that assertion too: make a simple text processor that
> >> reads Python source code and outputs the same source code with
> >> only one change: insert the string 'self" as the fi
Marc 'BlackJack' Rintsch wrote:
> Edward Elliott wrote:
>> I can prove that assertion too: make a simple text processor that reads
>> Python source code and outputs the same source code with only one change:
>> insert the string 'self" as the first parameter of every "def
>> somemethod". Next run t
Ben Finney wrote:
> My basis for rejecting the proposal is that it claims to offer net
> simplicity, yet it breaks at least two of the admonishments that
> simplify Python.
As do other features of Python. Or did you forget the follow-up to the
special cases "rule"?
Special cases aren't special
Ben Finney wrote:
> Edward Elliott <[EMAIL PROTECTED]> writes:
>> As long as we're trotting out aphorisms
>
> The ones I quoted were from Python.
> >>> import this
Yes I know where it's from.
> You've misunderstood "don't repeat yourself". It advocates *one*
> definition of any given thing i
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
> Ben Finney a écrit :
> > So now you're proposing that this be a special case when a
> > function is declared by that particular syntax, and it should be
> > different to when a function is created outside the class
> > definition and added as a met
Edward Elliott <[EMAIL PROTECTED]> writes:
> As long as we're trotting out aphorisms
The ones I quoted were from Python.
>>> import this
> how about DRY: Don't Repeat Yourself. The rule couldn't be clearer:
> don't repeat your SELF. ;) Yet that's exactly what explicitly
> declaring self do
Marc 'BlackJack' Rintsch a écrit :
(snip)
>
> Okay, let's start with writing a simple text processor for this little
> mess::
>
> def b(c):
> def d(r, *s, **t):
> print '***'
> c(r, *s, **t)
> return d
>
>
What a nice, readable, highly pythoni
In <[EMAIL PROTECTED]>, Edward Elliott
wrote:
> I can prove that assertion too: make a simple text processor that reads
> Python source code and outputs the same source code with only one change:
> insert the string 'self" as the first parameter of every "def somemethod".
> Next run the output so
Edward Elliott a écrit :
> bruno at modulix wrote:
>
>>Technically, they are still function objects. They are later wrapped
>>into method descriptor objects (at lookup time IIRC, but ask a guru or
>>read the doc to know for sure). And don't forget the case of nested
>>functions...
>
>
> I don't
bruno at modulix wrote:
> Technically, they are still function objects. They are later wrapped
> into method descriptor objects (at lookup time IIRC, but ask a guru or
> read the doc to know for sure). And don't forget the case of nested
> functions...
I don't see how nested functions change anyth
Edward Elliott wrote:
> Bruno Desthuilliers wrote:
>
>>But then, constructs like:
>>
>>class Obj(object):
>> def method(...): ...
>> method = staticmethod(method)
>>
>>or it's newer syntactic-sugar-version would become somewhat more
>>difficult to parse properly - but I admit that this is beyo
bruno at modulix wrote:
> And of course propose an implementation - perhaps the compiler.ast could
> be useful ?
Ugh. Just when I thought I'd seen my last abstract syntax tree, one rears
its ugly head.
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
> But then, constructs like:
>
> class Obj(object):
>def method(...): ...
>method = staticmethod(method)
>
> or it's newer syntactic-sugar-version would become somewhat more
> difficult to parse properly - but I admit that this is beyond my
> knowledge.
Hmm, th
Bruno Desthuilliers wrote:
> IOW, let's give Edward some time to come up with enough rope so we can
> hang him to the nearest (AS) Tree !-)
That's all I ask. ;)
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
(snip)
> Since Python 3K is supposed to be the 'clean the warts and don't bother
> breaking compat' rewrite of Python, you may as well propose a PEP on
> this. You'll have to really prove it doesn't break anything else in the
> object model, have strong and articulate arg
Ben Finney a écrit :
> Edward Elliott <[EMAIL PROTECTED]> writes:
>
>
>>Compiler, interpreter, magic-codey-runny-thingy, whatever, at some point
>>something has to translate this source code
>> def method (self, a, b): something
>>into a function object (or whatever you're calling the runnable c
Ben Finney wrote:
> So the tradeoff you propose is:
>
> - Honour "explicit is better than implicit", but users are confused
> over "why do I need to declare the instance in the method
> signature?"
>
> against
>
> - Break "explicit is better than implicit", take away some of the
>
Ben Finney wrote:
> So now you're proposing that this be a special case when a function is
> declared by that particular syntax, and it should be different to when
> a function is created outside the class definition and added as a
> method to the object at run-time.
>
> Thus breaking not only "ex
Edward Elliott a écrit :
> Bruno Desthuilliers wrote:
>
>>Edward, I know I told you so at least three times, but really,
>>seriously, do *yourself* a favor : take time to read about descriptors
>>and metaclasses - and if possible to experiment a bit - so you can get a
>>better understanding of Pyt
Edward Elliott <[EMAIL PROTECTED]> writes:
> Compiler, interpreter, magic-codey-runny-thingy, whatever, at some point
> something has to translate this source code
> def method (self, a, b): something
> into a function object (or whatever you're calling the runnable code this
> week). Call this
Edward Elliott <[EMAIL PROTECTED]> writes:
> bruno at modulix wrote:
> > class MyObj(object):
> > def __init__(self, name):
> > self.name = name
>
> class MyObj(object):
> def __init__(name):
> self.name = name
So the tradeoff you propose is:
- Honour "explicit is better than impl
Bruno Desthuilliers wrote:
> Edward, I know I told you so at least three times, but really,
> seriously, do *yourself* a favor : take time to read about descriptors
> and metaclasses - and if possible to experiment a bit - so you can get a
> better understanding of Python's object model. Then I'll
Edward Elliott a écrit :
> bruno at modulix wrote:
>
(snip)
>
>>You skipped the interesting part, so I repost it and ask again: how
>>could the following code work without the instance being an explicit
>>parameter of the function to be used as a method ?
>>
>>def someFunc(obj):
>> try:
>>pr
bruno at modulix wrote:
> It is to be taken literally. Either you talk about how Python
> effectively works or the whole discussion is useless.
I started talking about the code-level view (programmer's perspective) so
shorthand was fine. Now that we've moved on to interpreter/compiler-level
stuff
Edward Elliott wrote:
> bruno at modulix wrote:
>
>>>that 1) b is an object not a module*, and 2) objects pass references to
>>>themselves as the first argument to their methods.
>>
>>Nope. It's the MethodType object (a descriptor) that wraps the function
>>that do the job. The object itself is to
bruno at modulix wrote:
>> that 1) b is an object not a module*, and 2) objects pass references to
>> themselves as the first argument to their methods.
>
> Nope. It's the MethodType object (a descriptor) that wraps the function
> that do the job. The object itself is totally unaware of this.
It'
Edward Elliott wrote:
> Holger wrote:
>
>>oops, that was kinda embarrassing.
>
>
> It's really not. You got a completely unhelpful error message saying you
> passed 2 args when you only passed one explicitly. The fact the b is also
> an argument to b.addfile(f) is totally nonobvious until you
Steve Holden wrote:
> Objects don't actually "pass references to themselves". The interpreter
> adds the bound instance as the first argument to a call on a bound method.
Sure, if you want to get technical For that matter, objects don't actually
call their methods either -- the interpreter looks
No way. You didn't deserve it. Unless you came from another OO
language, the Guido tutorial on Classes is unintelligible. It assumes
way too much knowledge.
But I found something else that looks promising that you may want to
peek at:
http://pytut.infogami.com/node11-baseline.html
rd
Reply
--
Just my opinion, but I think the Guido tutorial on Classes is
unintelligible unless you're coming from another OO language.
But I found something else that looks promising that you may want to
peek at:
http://pytut.infogami.com/node11-baseline.html
rd
--
http://mail.python.org/mailman/listinf
Edward Elliott wrote:
> Holger wrote:
>
>>oops, that was kinda embarrassing.
>
>
> It's really not. You got a completely unhelpful error message saying you
> passed 2 args when you only passed one explicitly. The fact the b is also
> an argument to b.addfile(f) is totally nonobvious until you
Holger wrote:
> oops, that was kinda embarrassing.
It's really not. You got a completely unhelpful error message saying you
passed 2 args when you only passed one explicitly. The fact the b is also
an argument to b.addfile(f) is totally nonobvious until you know that 1) b
is an object not a modu
1 - 100 of 136 matches
Mail list logo