-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris McDonough wrote:
> On 3/16/10 3:36 PM, Charlie Clark wrote:
>> Am 16.03.2010, 20:12 Uhr, schrieb Adam Hutton<b...@bugs.repoze.org>:
>>
>>> In this example, c.facility_housing is a list of objects
>>> (SQLAlchemy-created)
>>> which have an attribute '.housing' that is a string.
>>> @@ PYTHON
>>>>>> ', '.join([housing_type.housing for housing_type in
>>>>>> c.facility_housing])
>>> u'Assisted Living, Independent Living'
>>> @@ Chameleon Page Template
>>> <dd tal:content = "', '.join([housing_type.housing for housing_type in
>>> c.facility_housing])" />
>> Do list comprehensions count as statements?
> 
> Yes.  Basically anything that doesn't do a variable assignment or uses 
> something like "print" can be part of a statement.

'expressions' are things that have values;  'statements' (like print in
Python2, or assignments) don't.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuf5nkACgkQ+gerLs4ltQ7SMACeJHgybyJOE8GOvB0FYhLSoXq8
ZX8AoIZ8QVpxHB2P+J/Rds5ORNAbc+cO
=8KUu
-----END PGP SIGNATURE-----
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to