Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
MASTERING PYCHARM

You're reading from   MASTERING PYCHARM Use PyCharm with fluid efficiency to write idiomatic python code

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781783551316
Length 232 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nafiul Islam Nafiul Islam
Author Profile Icon Nafiul Islam
Nafiul Islam
Arrow right icon
View More author details
Toc

Improving code completion

Code completion in PyCharm is really quite something, and there are many things that you can do to enhance it even further. PyCharm normally gives you code completion options as you type:

Improving code completion

However, if you press Ctrl + spacebar while this popup is on the screen, you will get even more code completion options:

Improving code completion

Note that islice is not even imported, yet PyCharm can smartly tell you that you can use it, and if you chose to do so, it will be automatically imported. PyCharm also supports Cyclic Word Completion also known as Hippe Complete (Alt + /), which can prove to be very useful when you want completion in strings:

Improving code completion

Furthermore, you can fine-tune your completion options:

Improving code completion

Here, [1] is, by default, set to first letter, and I feel it's best to demonstrate this with an example.

With first letter, you will need to type in a capital K in order to get KeyboardInterrrupt; otherwise, it will never show up in your completion options:

Improving code completion

But, with the setting set to None, you...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime