Re: "prove"

2008-05-09 Thread Lucas Prado Melo
Thanks for all the answers. I bet I will convince this guy!
--
http://mail.python.org/mailman/listinfo/python-list


Re: "prove"

2008-05-09 Thread Lucas Prado Melo
On Fri, May 9, 2008 at 5:32 AM, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Why do you need the documentation ? Just fire up your python shell and hack
> a Q&D example:
I agree. I said it to this person, but he insisted I should use documentation...
--
http://mail.python.org/mailman/listinfo/python-list


Re: "prove"

2008-05-09 Thread Duncan Booth
"Lucas Prado Melo" <[EMAIL PROTECTED]> wrote:

> Hello,
> How could I "prove" to someone that python accepts this syntax using
> the documentation (I couldn't find it anywhere):
> classname.functionname(objectname)


Language reference, mostly section 5.3 Primaries

call ::= 
 primary "(" [argument_list [","]
| expression genexpr_for] ")"

primary ::= 
 atom | attributeref
  | subscription | slicing | call

attributeref ::= 
 primary "." identifier

atom ::= 
 identifier | literal | enclosure


That shows fairly well how the classname.functioname bit works (it is an 
attributeref which is a primary which forms the first part of a call), 
but you'll have to wade through a fair bit of the grammar to show that 
argument_list can be an identifier.


argument_list ::= 
 positional_arguments ["," keyword_arguments]
 ["," "*" expression]
 ["," "**" expression]
| keyword_arguments ["," "*" expression]
["," "**" expression]
| "*" expression ["," "**" expression]
| "**" expression

positional_arguments ::= 
 expression ("," expression)*

... and so on ...
--
http://mail.python.org/mailman/listinfo/python-list


Re: "prove"

2008-05-09 Thread Bruno Desthuilliers

Lucas Prado Melo a écrit :

Hello,
How could I "prove" to someone that python accepts this syntax using
the documentation (I couldn't find it anywhere):
classname.functionname(objectname)


Why do you need the documentation ? Just fire up your python shell and 
hack a Q&D example:


Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class Foo(object):
... def bar(self):
... print "in %s bar" % self
...
>>> f = Foo()
>>> Foo.bar(f)
in <__main__.Foo object at 0xb7dccd2c> bar
>>> f.bar()
in <__main__.Foo object at 0xb7dccd2c> bar
>>>

--
http://mail.python.org/mailman/listinfo/python-list


Re: "prove"

2008-05-08 Thread hdante
On May 8, 10:50 am, "Lucas Prado Melo" <[EMAIL PROTECTED]> wrote:
> Hello,
> How could I "prove" to someone that python accepts this syntax using
> the documentation (I couldn't find it anywhere):
> classname.functionname(objectname)

 It's in the language reference, section 3.2 "The standard type
hierarchy", subsection "Classes". The relevant paragraphs are those:

Classes
Class objects are created by class definitions (see section 7.7,
``Class definitions''). A class has a namespace implemented by a
dictionary object. Class attribute references are translated to
lookups in this dictionary, e.g., "C.x" is translated to
"C.__dict__["x"]". When the attribute name is not found there, the
attribute search continues in the base classes. The search is depth-
first, left-to-right in the order of occurrence in the base class
list.

When a class attribute reference (for class C, say) would yield a
user-defined function object or an unbound user-defined method object
whose associated class is either C or one of its base classes, it is
transformed into an unbound user-defined method object whose im_class
attribute is C. When it would yield a class method object, it is
transformed into a bound user-defined method object whose im_class and
im_self attributes are both C. When it would yield a static method
object, it is transformed into the object wrapped by the static method
object. See section 3.4.2 for another way in which attributes
retrieved from a class may differ from those actually contained in its
__dict__.

 http://docs.python.org/ref/types.html
--
http://mail.python.org/mailman/listinfo/python-list


Re: "prove"

2008-05-08 Thread Lucas Prado Melo
Thanks Marco, this is just what I was looking for.

On Thu, May 8, 2008 at 11:02 AM, David <[EMAIL PROTECTED]> wrote:
> >  classname.functionname(objectname)
>
>  Do you mean something like this?
>
>  class myclass:
> @staticmethod
> def myfunction(myobject): pass
>
>  myobject = None
>  myclass.myfunction(myobject)
No, but thanks for the link, very useful.
--
http://mail.python.org/mailman/listinfo/python-list


Re: "prove"

2008-05-08 Thread David
>  classname.functionname(objectname)

Do you mean something like this?

class myclass:
@staticmethod
def myfunction(myobject): pass

myobject = None
myclass.myfunction(myobject)

If so, then you want to check the staticmethod decorator, described here:

http://docs.python.org/lib/built-in-funcs.html

David.
--
http://mail.python.org/mailman/listinfo/python-list


Re: "prove"

2008-05-08 Thread Marco Mariani

Lucas Prado Melo wrote:


How could I "prove" to someone that python accepts this syntax using
the documentation (I couldn't find it anywhere):
classname.functionname(objectname)


TUtorial 9.3.4, method objects

What exactly happens when a method is called? You may have noticed that 
x.f() was called without an argument above, even though the function 
definition for f specified an argument. What happened to the argument? 
Surely Python raises an exception when a function that requires an 
argument is called without any -- even if the argument isn't actually 
used...


Actually, you may have guessed the answer: the special thing about 
methods is that the object is passed as the first argument of the 
function. In our example, the call x.f() is exactly equivalent to 
MyClass.f(x). In general, calling a method with a list of n arguments is 
equivalent to calling the corresponding function with an argument list 
that is created by inserting the method's object before the first argument.

--
http://mail.python.org/mailman/listinfo/python-list


"prove"

2008-05-08 Thread Lucas Prado Melo
Hello,
How could I "prove" to someone that python accepts this syntax using
the documentation (I couldn't find it anywhere):
classname.functionname(objectname)
--
http://mail.python.org/mailman/listinfo/python-list


Re: Take the $million challenge: Prove 911 conspriracy theorists are wrong

2006-12-01 Thread [EMAIL PROTECTED]
The proper edicate would be to write software in python and then link
to your point of view.  It is common practice in music software.  I
tend of think of you like ufo people, if there is a conspiracy of some
sort they use you to discredit it.

https://sourceforge.net/projects/dex-tracker
http://www.dexrow.com



[EMAIL PROTECTED] wrote:
> I found this nice dialog on the internet:
> =
>
> > Well, if you want to convice me, just answer these questions:
>
> If you can prove that the official explanation is correct, what's
> keeping
> you from collecting a MILLION dollars?  Even if you're too wealthy to
> bother, you could donate the proceeds to the Aryan Nation or the John
> Birch
> Society.
>
> > 1. How much explosives were used and what type?
>
> Thermate/thermite have been discovered in chemical tests, and evidence
> of
> its use is plainly visible in photographic an video evidence from the
> WTC
> buildings on 9/11.  Thermate does not cause millions of tones of
> concrete to
> become pulverized into dust in mid-air (as video evidence clearly
> shows), so
> another high-energy explosive must have also been used. Now that we
> have
> positive proof that explosives were used, and once the secondary
> compounds
> have been discovered, the quantities and placement can be estimated
> from
> examinations of the video and photo evidence.
>
> > 2. How many people were needed to prepare the building for demolition?
>
> Irrelevant to the established fact that explosives were used.  Will be
> determined in the new investigation. BTW: It's "buildings," not
> "building."
> Did you realize that *three* WTC towers collapsed on 9/11/01, despite
> only 2
> buildings being hit by jets?  Most Americans don't realize this obvious
> fact.  Why?
>
> > 3. How long did it take to prepare the buildings for demolition?
>
> Irrelevant to the established fact that explosives were used.  Once the
> identities of the conspirators are discovered in a new investigation,
> the
> timeline can be established.  (That's what investigators do.)
>
> > 4. How many people had to be bribed and how much were they bribed to
> > keep silent about the preparations?
>
> Irrelevant to the established fact that explosives were used.  Those
> conspirators (whether bribed or not) that are still alive must be
> discovered
> and convicted for their crimes, which may include conspiracy to commit
> treason. The only way to bring the criminals to justice is to open a
> new
> investigation which will examine *all* relevant evidence, including
> sequestered videos, audio tapes, and classified documents.
>
> Everybody with an IQ above room temperature knows that the 9/11
> Commission
> report was a whitewash, which didn't even attempt to lay blame at the
> feet
> of military and civilian officials who were asleep at the wheel on
> 9/11/01.
> It proves that Bush is not serious about national security.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Take the $million challenge: Prove 911 conspriracy theorists are wrong

2006-12-01 Thread Tonico

[EMAIL PROTECTED] wrote:
> Do you mean to say that the dimension to pursue truth and freedom from
> deception lack for people using TeX? or they must not be informed of
> it?

What kind of "dimension" is needed to pursue truths and freedom from
deception stuff?
Anyway, it is not lack of that: this is a maths group. That's all. Can
you understand that or will there be need to spell it for you?
Tonio

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Take the $million challenge: Prove 911 conspriracy theorists are wrong

2006-12-01 Thread st911
Do you mean to say that the dimension to pursue truth and freedom from
deception lack for people using TeX? or they must not be informed of
it?

BTW, Mr Siegman from Stanford of Yatches, whats your take on Neturei
Karta ? If I am making a guess based on the sample space I have seen in
"elite" universities, most jews are fervent Zionists even if they are
atheists. I would really like to discuss with some university
professors (especially jewish - almost always zionist) what they think
of Neturei Karta, and the free book that is there, Min Ha Mitzer, (From
the depths) about the role of zionists in abetting the slaughter of the
Jews, nay, in fervently provoking Hitler or someone in that very
direction. Its written by Rabbi Wasserman and unlike your book on
Lasers, is freely available. I assure you, my dialogue with you on this
subject will be civilized. Only, polite language would be used. I only
use the impolite phrases for criminals like those who carried out 911
under the theories of LIHOP/MIHOP and people like Edward Bernays who
maliciously deceived the people or those who masterminded and carried
evil operations like COINTELPRO.

Aandi Inston wrote:
> [EMAIL PROTECTED] wrote:
>
> >I found this nice dialog on the internet:
>
> Doubtless, but why did you choose to share it with a bunch of news
> groups which aren't related to the subject?
> 
> Aandi Inston  [EMAIL PROTECTED] http://www.quite.com
> Please support usenet! Post replies and follow-ups, don't e-mail them.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Take the $million challenge: Prove 911 conspriracy theorists are wrong

2006-12-01 Thread Aandi Inston
[EMAIL PROTECTED] wrote:

>I found this nice dialog on the internet:

Doubtless, but why did you choose to share it with a bunch of news
groups which aren't related to the subject?

Aandi Inston  [EMAIL PROTECTED] http://www.quite.com
Please support usenet! Post replies and follow-ups, don't e-mail them.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Take the $million challenge: Prove 911 conspriracy theorists are wrong

2006-12-01 Thread st911
I found this nice dialog on the internet:
=

> Well, if you want to convice me, just answer these questions:

If you can prove that the official explanation is correct, what's
keeping
you from collecting a MILLION dollars?  Even if you're too wealthy to
bother, you could donate the proceeds to the Aryan Nation or the John
Birch
Society.

> 1. How much explosives were used and what type?

Thermate/thermite have been discovered in chemical tests, and evidence
of
its use is plainly visible in photographic an video evidence from the
WTC
buildings on 9/11.  Thermate does not cause millions of tones of
concrete to
become pulverized into dust in mid-air (as video evidence clearly
shows), so
another high-energy explosive must have also been used. Now that we
have
positive proof that explosives were used, and once the secondary
compounds
have been discovered, the quantities and placement can be estimated
from
examinations of the video and photo evidence.

> 2. How many people were needed to prepare the building for demolition?

Irrelevant to the established fact that explosives were used.  Will be
determined in the new investigation. BTW: It's "buildings," not
"building."
Did you realize that *three* WTC towers collapsed on 9/11/01, despite
only 2
buildings being hit by jets?  Most Americans don't realize this obvious
fact.  Why?

> 3. How long did it take to prepare the buildings for demolition?

Irrelevant to the established fact that explosives were used.  Once the
identities of the conspirators are discovered in a new investigation,
the
timeline can be established.  (That's what investigators do.)

> 4. How many people had to be bribed and how much were they bribed to
> keep silent about the preparations?

Irrelevant to the established fact that explosives were used.  Those
conspirators (whether bribed or not) that are still alive must be
discovered
and convicted for their crimes, which may include conspiracy to commit
treason. The only way to bring the criminals to justice is to open a
new
investigation which will examine *all* relevant evidence, including
sequestered videos, audio tapes, and classified documents.

Everybody with an IQ above room temperature knows that the 9/11
Commission
report was a whitewash, which didn't even attempt to lay blame at the
feet
of military and civilian officials who were asleep at the wheel on
9/11/01.
It proves that Bush is not serious about national security.

-- 
http://mail.python.org/mailman/listinfo/python-list