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 1 1469
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 3 ficheros de texto.
El cual adapte para el desarrollo de mi DB.
El proceso es genial, pues junto los tres ficheros pulsando solo un boton.
(O determinada accion EVENTOS)
|
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 MAXLINE 1000 /* lunghezza massima di una linea */
int getline(char line, int maxline);
void copy(char to, char from);
|
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 code below.
I could not get sscanf to work because it does not increment its
position
|
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 need a range for validate that
(for at last integers, float and double)
; int cf(void);
_cf:
|
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 character, but only some of them give me error. Can some one help me?
the array is like this:
char* SortedArray=
{
"a base de",
"a continuaci\xF3n",
"a diferencia de",
"a el",
"a ella",
| |
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 = urllib2.Request(URL, "&mac_addr=" + mac_addr + " &sampled_time=" + sampled_time + " &line_data=" + linea)
ret = urllib2.urlopen(req).read()
except (urllib2.URLError, httplib.HTTPException):
logger.error('Error de comunicación con el...
|
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 use the second one on it reads the first line and keeps printing.
Ive tried using only the second filereader puting a break at the end of the while, etc. and nothing has worked to stop it.
Please help!
import java.io.*;
import java.util.*;
...
|
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, then go to next line. Any suggestion?
|
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 when the user writes something similar.
Third, I need the user to be able to select multiple items from the combobox.
Fourth, I need it to be syncronized to other comboboxes, so that they all contain always the same information, even if someone add a...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |