can Python be useful as functional?

  • Thread starter Bruno Desthuilliers
  • Start date
B

Bryan Olson

Rustom Mody asked:
[...] why does

(yield(x) for x in si(l) if x % p != 0)

not work? I would have expected generator expression to play better
with generators.

You have a statement, "yield(x)", where the construct requires
an expression.
 
X

Xing

Dear list members,
I am a newcomer in the world of Python. But I am attracted by Python's power in handling text! Now I apply it to handle Chinese but the Chinese character cann't be displayed on the screen. What displayed on the screen is the 16bits codes. I am so puzzled! I believe this is an easy question to most of python users and an important question to me. Thanks a lot to your help!
 
C

Carsten Haese

Dear list members,
I am a newcomer in the world of Python. But I am attracted by
Python's power in handling text! Now I apply it to handle Chinese but
the Chinese character cann't be displayed on the screen. What
displayed on the screen is the 16bits codes. I am so puzzled! I
believe this is an easy question to most of python users and an
important question to me. Thanks a lot to your help!

You are not giving us any background information for troubleshooting
this. Your problem could be caused by a million different things, and
there is not point in us guessing. Please start by answering the
following questions:

1) What operating system are you using?
2) Can any programs on your computer display Chinese characters?
3) Where are you trying to display Chinese characters? Python command
line, in IDLE, in some GUI window?
4) Where are the Chinese characters you're trying to display coming
from? Are they hard-coded in your script, are they read from the
keyboard, from a file, from a database, from a web page?
 
D

DaveM

I've seen this before, and it is witty.

However, it is perhaps unfair towards the woman. The man, after all, is
someone who has offered a woman money in return for sex.

The whole story reads differently if we replace 'philosopher' by 'man'
and 'attractive lady' by 'woman'.

The version I prefer has the woman asking, "What sort of woman do you take
me for?"

DaveM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top