473,811 Members | 2,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why should input(prompt="h ello:") fail?

zhi
Really confused, when I use keyword style argument as following:
input(prompt="h ello")


Traceback (most recent call last):
File "<pyshell#5 2>", line 1, in -toplevel-
input(prompt="h ello")
TypeError: input() takes no keyword arguments

While the library reference says the function is: input( [prompt])
so, it should work.:(

I am using python 2.3 for windows.
Have anyone tried this?
I am new to python, please help me, thanks.
Jul 18 '05
12 6439
Note however that input() is a poor choice for serious work: you
should quickly get past the point of wanting to use it and learn why
raw_input() is a better choice.


Michele> Very true. Is "input" a candidate for deprecation in 3.0? If
Michele> not, here I give my vote to put "input" in the black list ;)

Even better, deprecate input() and rename raw_input() to input()...

Skip

Jul 18 '05 #11
Skip Montanaro wrote:
>> Note however that input() is a poor choice for serious work: you
>> should quickly get past the point of wanting to use it and learn why
>> raw_input() is a better choice.


Michele> Very true. Is "input" a candidate for deprecation in 3.0? If
Michele> not, here I give my vote to put "input" in the black list ;)

Even better, deprecate input() and rename raw_input() to input()...


If you mean do those two things at the same time, you've just deprecated the
use of "input" and then provided only a routine named "input"...

And if you mean to separate them with one release to give time for the
deprecation notice to spread around, you'll just confuse people when you
then add "input" back in, but with different functionality.

(I agree with the idea of reusing the name input() for the One True Input
Routine, but not with deprecating anything as it will just confuse the issue.)

-Peter
Jul 18 '05 #12
In article <3F************ ***@engcorp.com >,
Peter Hansen <pe***@engcorp. com> wrote:
Skip Montanaro wrote:

Even better, deprecate input() and rename raw_input() to input()...


If you mean do those two things at the same time, you've just
deprecated the use of "input" and then provided only a routine named
"input"...

And if you mean to separate them with one release to give time for the
deprecation notice to spread around, you'll just confuse people when
you then add "input" back in, but with different functionality.

(I agree with the idea of reusing the name input() for the One True
Input Routine, but not with deprecating anything as it will just
confuse the issue.)


Yeah, what would make more sense would be to rename input() to
eval_input() and rename raw_input() to input(), and immediately
deprecate eval_input().
--
Aahz (aa**@pythoncra ft.com) <*> http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote
programs, then the first woodpecker that came along would destroy civilization.
Jul 18 '05 #13

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

Similar topics

2
28579
by: Matt | last post by:
If I do the following, the browse text box still cannot see C:/hello world/test.txt. <input type="file" name="fileName" value="C:/hello world/test.txt" size=80> Any ideas? and workarounds to this problem? thanks!!
0
1638
by: Woody Lemcke | last post by:
Hello all, Would you gurus please share your wisdom on any DB2 equivalents to the Informix "Forms" input form utility and "Ace" report generating utility? The input form will probably be accessed by telneting from a Linux shell or Windows command prompt and used for updating a lab database. Thanks and regards, Woody Lemcke
4
11433
by: Ying Lu | last post by:
Hello all, Is it possible that we setup the password in the pg_dump command line instead of let users input it through prompt command. E.g., pg_dump test -c -d --host=localhost -U testUser1 --file='a.dmp' --no-privileges Thanks a lot! Ly
11
11192
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in a text box. I know that there are certain control characters embedded in the data that I want to display substitutions for in the text box, for instance I want to replace ASCII character 04 with the string "<EOT>". I have tried doing a simple...
0
1530
by: Adam | last post by:
Hello, I have a small app I am creating to crawl a directory and check that if it is moved to another a location it's path will not break a character limit. Usually the Windows path limit. Now the script is working but every time I want to scan again I have to restart for the log files to be written. I want to just be able to change the parameter as I please and click scan without having to restart the app for the log file to change.
0
9722
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
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,...
0
10379
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 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...
0
10124
tracyyun
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...
1
7664
isladogs
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...
0
5550
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...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4334
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
3
3015
bsmnconsultancy
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...

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.