473,395 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

en la misma linea

Hola,

Aca con una pregunta basica:
A veces veo que hay programas que tienen varias instrucciones en la
misma linea, cuando lo que aprendi de Python era que se usaba el
espaciado para mantener la estructura (indent).
Por ejemplo:
if name != 'comic': return
Hay un return despues de los dos puntos, no se que significa.
--
Bioinformatics news: http://www.bioinformatica.info
Lriser: http://www.linspire.com/lraiser_success.php?serial=318
Jan 26 '06 #1
1 1452
Sebastian Bassi wrote:
Por ejemplo:
if name != 'comic': return
Hay un return despues de los dos puntos, no se que significa.


I can't write spanish, but nevertheless maybe an english answer is of help.
Yes, it's allowed to write that, and it is the same as:

if name != 'comic':
return

You are only allowed to write one statement behind a colon, though (except
with a little more hackery using semicolons, but forget that).

You should read up on the Python grammar...

--- Heiko.
Jan 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jorge Gallardo | last post by:
Hola de nuevo a todos... Agradecido a todos los que me habeis solucionado problemas anteriores... Pero como no es novedad, me surge otro. Recientemente buscando, adquiri un codigo para juntar...
5
by: Lorenzo Villari | last post by:
Ahem... I think I've found a typo on my copy of The C Programming Language Second Edition. On section 1.9 (page 32 on my version, the Italian one ) you do find: #include <stdio.h> #define...
3
by: whisper | last post by:
Hello: I am trying to write code to read in a bunch of lines from stdin, each containing a (variable) number of integers and writing each integer in a separate line to stdout. I came up the...
10
by: ¬a\\/b | last post by:
Careful thought library functions are important i think that for tame (domare) the input stream are useful function like these i use. i don't know if they are right Note: when ask input: is...
0
stealwings
by: stealwings | last post by:
Hello all, I wrote a sorted array with Unicode characters inside but I get 19 error when I compiling it, why is that? All the errors are because it is said that it's too big for a...
5
by: diegososa | last post by:
I have this code inside a function: try: for linea in subprocess.Popen(comando, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).stdout: req =...
1
by: DiegoP | last post by:
I've written the folowing code (using the ArraySet class ive created which is sort of like an array with extra methods): when I use the first time the filereader there is no problem, but the time I...
4
by: cplusplusquestion | last post by:
I have a binary file like: a bla bla bla bla b 12 23 34 80 38 a bla bla bla bla b 23 45 89 30 99 When I find first character of the line is 'a', I would like to skip reading this line,...
4
by: felipebucaram | last post by:
Hi, I have a combobox named "combo7", I have 3 problems to resolve. First, I need the user to be able to add items to the combobox from the userform. Second, I need the combobox to autocomplete...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.