[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Some specific exec behavior ?

Stef Mientki

1/1/2008 8:07:00 PM

Gabriel Genellina wrote:
> En Tue, 01 Jan 2008 16:39:21 -0200, Stef Mientki <stef.mientki@gmail.com>
> escribi�:
>
>
>> I find 2 strange behaviors in exec-function,
>> and I can't find anything in the documentation.
>> (Python 2.4.3 Enthought edition)
>>
>> 1. A function definition may not span more than 1 line, e.g.
>> This generates an exception:
>> def _func (x,y):
>> return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
>>
>> while this works correct:
>> def _func (x,y): return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
>>
>> 2. an emtpy line at the end also generates an exception
>>
>> Is this behavior correct ?
>> where should I find information about it ?
>>
>
> It's correct; source lines must be separated by '\n' only (NOT '\r\n' as
> in a Windows text file) and the last line must end in '\n'.
> It's documented, but under the compile() built-in function:
> http://docs.python.org/lib/built-in-f... perhaps the docs for exec
> should refer there.
>
>
Thanks Gabriel,
that explains everything !

cheers,
Stef


1 Answer

Supertech

5/28/2010 11:04:00 PM

0

You must be Hilary yourself with a false name.

She is treated like a sentimental narcissistic school girl by the NK media.

Hehehehehe..


"harmony" <aka@hotmail> wrote in message
news:4c003ef4$0$11834$bbae4d71@news.suddenlink.net...
> anti-hillary folks are right wing conspirators.
>
>
>
>
> "Supertech" <ejeong1@gmail.com> wrote in message
> news:AOmdnawwrKhctp3RnZ2dnUVZ_gOdnZ2d@giganews.com...
>> Funny, you don't seem to consider the possibility that NK did not, after
>> all, sink Cheonan.
>>
>> There is no clear cut evidence for anything, so hold off your judgment.
>>
>> The accused party says they didn't do it. Why do you believe your own
>> conjecture more than their words?
>>
>> All the reported reasons for the accusation have been based on pure
>> conjectures. Nothing less nothing more.
>>
>>
>>
>>
>> <usenet@mantra.com and/or www.mantra.com/jai (Dr. Jai Maharaj)> wrote in
>> message news:20100527PYj0LC51iwf59sxWLT0R0yu@KN8CS...
>>> Nobody wants a brawl with Pyongyang
>>>
>>> By Dmitry Kosyrev
>>> Op-Ed
>>> The Pioneer
>>> Thursday, May 27, 2010
>>>
>>> So North Korea will get away with sinking of South Korean warship
>>>
>>> The most remarkable thing about the sinking of the South Korean
>>> warship Cheonan is that nobody wants to talk about it. Let's look
>>> back at the international responses to the catastrophe: South Korean
>>> President Lee Myung-bak reported that he would submit the case to the
>>> UN Security Council. His American counterpart Barack Obama described
>>> this reaction as fully adequate. Others issued statements and
>>> condemnations. And that was it, strictly speaking, although 46
>>> sailors died in this disaster.
>>>
>>> Everything that is now going on between North and South Korea is
>>> anomalous and anachronistic in international politics. That is, all
>>> of this should not have happened from the standpoint of logic and
>>> pure reason. But it happened anyway, and it turns out that there is
>>> no way out of this predicament and no good solution. And so, there
>>> will be a series of symbolic gestures, and then the matter will be
>>> forgotten.
>>>
>>> Impossible? Well, why not? Not so long ago, in 2007, Israel bombed a
>>> facility in Syria. People died, although it is not clear how many.
>>> Israel still claims that the facility was part of Syria's military
>>> nuclear programme, whereas Syria maintains it was a regular military
>>> base. The IAEA has been carrying out an inquiry for more than two and
>>> a half years. Nothing else has been done. It turns out anything is
>>> possible.
>>>
>>> At first glance, everything seems more clear-cut with the South
>>> Korean warship. The international commission collected tangible
>>> evidence, including the fragments of a torpedo, and it became
>>> abundantly clear that that torpedo was launched from a North Korean
>>> submarine. It is also clear why the warship was hit -- the two
>>> countries do not agree on the location of their maritime border. The
>>> South is convinced the warship was in its own waters, while the North
>>> is convinced of the opposite. The uproar started after the results of
>>> the inquiry were published. And most importantly, who would want to
>>> launch torpedoes at South Korean ships if not the North Koreans?
>>>
>>> The point is that East Asian countries remember well how such cases
>>> play out. Remember, for example, the South Korean passenger Boeing
>>> that for some reason deviated from its planned route by 650
>>> kilometres, flew into the Soviet air space and was shot down in 1983.
>>> The USSR tried to defend itself -- it explained that modern aircraft
>>> did not make such mistakes, and that the Boeing's flight path had
>>> intersected with the American Orion reconnaissance plane, after which
>>> it became nearly impossible to tell which plane was which on radar.
>>>
>>> It later turned out that the pilots of the South Korean airline
>>> regularly collected footage of Soviet territory for the CIA. There
>>> was a trial in Seoul that caused a stir on a national scale, but by
>>> that time the Soviet Union no longer existed. So, as a result, the
>>> airliner story became something similar to the assassination of
>>> President Kennedy -- everyone understands that the official version
>>> somehow does not answer all the questions, and seems a lot like a
>>> provocation. But it is impossible to get to the bottom of it all, and
>>> nobody really wants to.
>>>
>>> In other words, doubts about the conclusions of such commissions will
>>> always remain. It is another matter during, for example, a high-
>>> stakes game between the USSR and the US, when it is possible to stage
>>> a competent provocation. But what if there are no stakes and the
>>> Korean problem has come to a complete standstill? Perhaps this is the
>>> beginning of a tougher, less effective policy against the North by
>>> the current South Korean President? Seoul has made many mistakes of
>>> course, but not to the point of sinking its own vessels.
>>>
>>> However, it is hard to imagine who would benefit from such a
>>> provocation in this part of the world today. Something similar could
>>> have taken place under the previous American administration. In fact,
>>> the six-party talks were undertaken by regional powers (China, Russia
>>> and South Korea) to prevent the Bush Administration from turning the
>>> Korean peninsula into a global flashpoint. But now it is clear that
>>> Washington has lost its taste for adventure.
>>>
>>> Pyongyang is unlikely to admit in the near future that some of its
>>> admirals made a mistake. Likewise, it is unlikely to pay any
>>> compensation (and money cannot compensate for the loss of human
>>> lives). Could the UN Security Council impose sanctions against
>>> Pyongyang? Maybe, but what would be the point? Isolating North Korea
>>> from the rest of the world makes no sense, if only because it is
>>> already isolated. And an invasion of North Korea would result in much
>>> heavier casualties than the attack on the Cheonan. Nuclear weapons do
>>> not change anything -- it would have been the same if North Korea
>>> were armed with spears and bows. Perhaps it makes sense to call the
>>> Government in Pyongyang inadequate? But then it should not have been
>>> cornered in the first part of the 2000s.
>>>
>>> The writer is a political affairs columnist based in Moscow.
>>>
>>> Comments:
>>>
>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>>
>>> Nobody wants a brawl with Pyongang
>>>
>>> By S Subramanyan on 5/27/2010 12:43:05 PM
>>>
>>> World has forgotten the issue after 1953 armistice. Western nations
>>> must bear the guilt of not working for the unification of the Koreas.
>>> They attempted it in Germany to suit them. Now before China, US seems
>>> helpless. Unless Korea is united again and Koreans have a say in
>>> world affairs, the entire peninsula will become a Chinese colony with
>>> western powers turning a blind eye.
>>>
>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>>
>>> http://dailypioneer.com/258498/Nobody-wants-a-brawl-with-Pyon...
>>>
>>> More at:
>>> http://www.dailyp...
>>>
>>> Jai Maharaj, Jyotishi
>>> Om Shanti
>>>
>>>
>>> o Not for commercial use. Solely to be fairly used for the
>>> educational
>>> purposes of research and open discussion. The contents of this post may
>>> not
>>> have been authored by, and do not necessarily represent the opinion of
>>> the
>>> poster. The contents are protected by copyright law and the exemption
>>> for
>>> fair use of copyrighted works.
>>> o If you send private e-mail to me, it will likely not be read,
>>> considered or answered if it does not contain your full legal name,
>>> current
>>> e-mail and postal addresses, and live-voice telephone number.
>>> o Posted for information and discussion. Views expressed by others
>>> are
>>> not necessarily those of the poster who may or may not have read the
>>> article.
>>>
>>> FAIR USE NOTICE: This article may contain copyrighted material the use
>>> of
>>> which may or may not have been specifically authorized by the copyright
>>> owner. This material is being made available in efforts to advance the
>>> understanding of environmental, political, human rights, economic,
>>> democratic, scientific, social, and cultural, etc., issues. It is
>>> believed
>>> that this constitutes a 'fair use' of any such copyrighted material as
>>> provided for in section 107 of the US Copyright Law. In accordance with
>>> Title
>>> 17 U.S.C. Section 107, the material on this site is distributed without
>>> profit to those who have expressed a prior interest in receiving the
>>> included
>>> information for research, comment, discussion and educational purposes
>>> by
>>> subscribing to USENET newsgroups or visiting web sites. For more
>>> information
>>> go to: http://www.law.cornell.edu/uscode/17...
>>> If you wish to use copyrighted material from this article for purposes
>>> of
>>> your own that go beyond 'fair use', you must obtain permission from the
>>> copyright owner.
>>>
>>> Since newsgroup posts are being removed
>>> by forgery by one or more net terrorists,
>>> this post may be reposted several times.
>>
>>
>
>