return None

2005-07-22 Thread Ximo
Can I do a function which don't return anything?

The question is that, if I do a function that have a return or without 
return, it returns always "None", but i want that it doesnt return me 
nothing

Thanks 


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


How "return" no return ?

2005-05-12 Thread Ximo
Hello, I want that the return sentence don't return anything, how can I do 
it?. If i do only return it returns None, and pass don't run too.

Can anyone help me?, thanks.
XIMO 


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


Re: How "return" no return ?

2005-05-12 Thread Ximo
I am doing a interpret of lines and it show me a prompt, and I want if I 
write a declaration as "int a" my progrtam return de prompt and nothing 
more, for exemple:

>>> 2+2
4
>>> int a
>>>

Then I'm finding that de function which execute "int a" return me nothing, 
and no

>>> int a
None
>>>



"Joseph Garvin" <[EMAIL PROTECTED]> escribió en el mensaje 
news:[EMAIL PROTECTED]
> Ximo wrote:
>
>>Hello, I want that the return sentence don't return anything, how can I do
>>it?. If i do only return it returns None, and pass don't run too.
>>
>>Can anyone help me?, thanks.
>>XIMO
>>
>>
>>
>>
> Returning None is the same as returning nothing. What exactly are you
> trying to do? 


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

Re: How "return" no return ?

2005-05-12 Thread Ximo
I am doing my own interpreter with the Python languaje.

Do you understand me?



"Fredrik Lundh" <[EMAIL PROTECTED]> escribió en el mensaje 
news:[EMAIL PROTECTED]
> "Ximo" wrote:
>
>> I am doing a interpret of lines and it show me a prompt, and I want if I
>> write a declaration as "int a" my progrtam return de prompt and nothing
>> more, for exemple:
>>
>> >>> 2+2
>> 4
>> >>> int a
>> >>>
>>
>> Then I'm finding that de function which execute "int a" return me 
>> nothing,
>> and no
>>
>> >>> int a
>> None
>> >>>
>
> what Python version are you using?  here's what a normal Python
> interpreter is supposed to do with your example:
>
>>>> 2+2
> 4
>>>> int a
>  File "", line 1
>int a
>^
> SyntaxError: invalid syntax
>>>>
>
> 
>
>
> 


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

execution error

2005-05-23 Thread Ximo
Hello, I'm programing an advanced calculator, and I have many problems with 
the execution errors, specually with the division by 0.

And my question is how can show the execution error whitout exit of the 
program, showing it in the error output as

>>2+2
>>4
>>3*4
>>12
>>6/0
>>"Error: Division per 0"

Thank you. 


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


Re: execution error

2005-05-24 Thread Ximo

"Skip Montanaro" <[EMAIL PROTECTED]> escribió en el mensaje 
news:[EMAIL PROTECTED]
>
>Ximo> And my question is how can show the execution error whitout exit
>Ximo> of the program, showing it in the error output as
>
> You need to catch ZeroDivisionError.  Here's a trivial example:
>
>>>> try:
>...   6/0
>... except ZeroDivisionError:
>...   print "whoops! divide by zero..."
>...
>whoops! divide by zero...

But I execute the operation in the else:

try:
   except ZeroDivisionError:
   print "whoops! divide by zero..."
else:
   execute( )

The exeption is produced after.









>
> Skip 


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

Re: execution error

2005-05-24 Thread Ximo
>>    Ximo> My question is how can show the execution error whitout exit  of 
>> the program, showing it in the error output as


>> Skip> You need to catch ZeroDivisionError.  Here's a trivial example:


>>>>> try:
>>...   6/0
>>... except ZeroDivisionError:
>>...   print "whoops! divide by zero..."
>>...
>>whoops! divide by zero...


 But I execute the operation in the else:

try:
   except ZeroDivisionError:
   print "whoops! divide by zero..."
else:
   execute( )

 The exeption is produced after. 


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


execution error 2

2005-05-24 Thread Ximo
>>    Ximo> My question is how can show the execution error whitout exit  of
>> the program, showing it in the error output as


>> Skip> You need to catch ZeroDivisionError.  Here's a trivial example:


>>>>> try:
>>...   6/0
>>... except ZeroDivisionError:
>>...   print "whoops! divide by zero..."
>>...
>>whoops! divide by zero...


 But I execute the operation in the else:

try:
   except ZeroDivisionError:
   print "whoops! divide by zero..."
else:
   execute( )

 The exeption is produced after.



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


Re: Python Web Frameworks

2007-01-18 Thread Ximo Nadal
Shortash wrote:
> Hi Gurus,
> 
> I want to build a Python web app but im not sure which one to go for. I
> prefer something like asp.Net , which would allow me to fully seperate
> the presentation layer from the logic. Please advise?
> 
> thanks,
> 
> "Shortash'
> 
Hi,

Look at <http://wiki.python.org/moin/WebFrameworks> there are same of them.

Now I'm studing karrigell, it's very interesting.

bye,

-- 
Ximo Nadal <[EMAIL PROTECTED]>
Powered by Debian GNU/Linux 
-- 
http://mail.python.org/mailman/listinfo/python-list