Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8897439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:20:39+00:00 2026-06-15T00:20:39+00:00

I am working through a tutorial on searching an .html file using regular expressions

  • 0

I am working through a tutorial on searching an .html file using regular expressions (the re module). I am using the interpreter.

I opened the file and preformed my search. After each attempt, I used f.seek(0) to return to the beginning of the file for the next attempt. I confirmed my location in the file using f.tell().

The first few time that I did this, the location of the file (in bytes) was returned without an L appended to it. But after several attempts, f.tell() returned the location with an L appended.

I understand that the L signifies that the file location (in bytes) is a long number. But why would f.tell() suddenly begin to return the L, when it had not on prior occasions?

I then closed and re-opened the file, and f.tell() returned the long number from the onset?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:20:40+00:00Added an answer on June 15, 2026 at 12:20 am

    Yes, the L signifies a long (which is practically only limited by the memory and computation time).

    Python in general does automatic promotions of ints to longs as soon as the value exceeds the range the int type can handle. Also, if some operation with another long takes place, the result always is a long (0 + 0L → 0L).

    In your case I can only speculate what caused this effect. Maybe reading beyond a certain limit caused the promotion, maybe some internal handling (which does not always take place) was the reason.

    I don’t think that it will matter to you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working through Beej's socket tutorial . Using the sample code I've created a
I have been working through the tutorial by Alex Young on using flash messages
I began working through the Trigger.io tutorial. After viewing the output successfully in the
I'm working through a tutorial on using OpenSSL and when I try something rather
I was working through a tutorial at http://fszlin.blogspot.com/2010/05/comsuming-wcf-services-with-android.html and am having a problem. The
Hi I am working through the tutorial here using windows XP and latest builds
I'm working through the Django tutorial after having installed the development source of Django
After working through this Github tutorial I'm more confused than when I started. I
I'm new to Rails, and I was working through the tutorial here: http://guides.rubyonrails.org/getting_started.html When
I have been working through the tutorial at http://bkiers.blogspot.de/2011/03/creating-your-own-programming-language.html . In short, a small

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.