🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #268146

Re: Ciemna strona C++

#268146
From: Seweryn Habdank-Wojewódzki
Date: Thu, 22 Nov 2007 20:18
46 lines
2023 bytes
Witam

Marcin ?Qrczak? Kowalczyk wrote:

> Wcale nie. Możesz tak:
> 
>    dict(A=10, B=20, C=30)

Masz rację nawiasy wstawiłem odruchowo.
 
Przestudiuj może przykład poniżej i powiedz mi co to znaczy w tym
kontekście "SyntaxError: *keyword* can't be an expression", dla mnie ten
błąd jest nieczytelny.

Przykład 1:

#!/usr/bin/env python

def main(argv):
    a = dict (one two=12, two three=23)
    #a = {'one two':12,'two three':23}
    print a

if  __name__ == '__main__':
    import sys
    sys.exit (main (sys.argv))

Przykład 2:

#!/usr/bin/env python

def main(argv):
    a = dict ('one two'=12, 'two three'=23)
    #a = {'one two':12,'two three':23}
    print a

if  __name__ == '__main__':
    import sys
    sys.exit (main (sys.argv))


Pozdrawiam.

-- 
|\/\/|   Seweryn Habdank-Wojewódzki
 \/\/
Technical Details
Message-ID: <fi4nbj$oqa$1@news.vectranet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.vectranet.pl!not-for-mail
References: <fghgeo$spf$1@nemesis.news.tpi.pl> <20071106002442.aebf0037.sulsa@dontmail.me> <fgqpbs$9cu$1@news.vectranet.pl> <20071107012633.3efe623d@Vorago> <fgtc67$orn$1@news.vectranet.pl> <fgv710$kde$1@bozon2.softax.pl> <fgv9u6$jm0$1@news.vectranet.pl> <fhfdq5$4bk$1@bozon2.softax.pl> <fi3cqb$et1$2@news.vectranet.pl> <fi41s4$dk4$1@bozon2.softax.pl> <fi4kpq$mc2$1@news.vectranet.pl> <1195760702.23696.4.camel@qrnik>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.vectranet.pl!not-for-mail
From: Seweryn Habdank-Wojewódzki <shw_mail@wp.pl>
Newsgroups: pl.comp.lang.c
Subject: Re: Ciemna strona C++
Date: Thu, 22 Nov 2007 21:18:14 +0100
Organization: VectraNET - http://www.vectranet.pl
Lines: 47
Message-ID: <fi4nbj$oqa$1@news.vectranet.pl>
References: <fghgeo$spf$1@nemesis.news.tpi.pl> <20071106002442.aebf0037.sulsa@dontmail.me> <fgqpbs$9cu$1@news.vectranet.pl> <20071107012633.3efe623d@Vorago> <fgtc67$orn$1@news.vectranet.pl> <fgv710$kde$1@bozon2.softax.pl> <fgv9u6$jm0$1@news.vectranet.pl> <fhfdq5$4bk$1@bozon2.softax.pl> <fi3cqb$et1$2@news.vectranet.pl> <fi41s4$dk4$1@bozon2.softax.pl> <fi4kpq$mc2$1@news.vectranet.pl> <1195760702.23696.4.camel@qrnik>
Reply-To: shw_mail@wp.pl
NNTP-Posting-Host: 078088193244.osw.vectranet.pl
Mime-Version: 1.0
X-Trace: news.vectranet.pl 1195761843 25418 78.88.193.244 (22 Nov 2007 20:04:03 GMT)
X-Complaints-To: usenet@news.vectranet.pl
NNTP-Posting-Date: Thu, 22 Nov 2007 20:04:03 +0000 (UTC)
User-Agent: KNode/0.10.5
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit